blob: 4a913217e7248a7bac525f395941c2b8135b79b7 [file] [log] [blame]
// Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
library fasta.type_builder;
import 'builder.dart' show Builder, TypeDeclarationBuilder, TypeVariableBuilder;
import 'scope.dart' show Scope;
// TODO(ahe): Make const class.
abstract class TypeBuilder extends Builder {
TypeBuilder(int charOffset, Uri fileUri) : super(null, charOffset, fileUri);
void resolveIn(Scope scope);
void bind(TypeDeclarationBuilder builder);
/// May return null, for example, for mixin applications.
String get name;
String get debugName;
StringBuffer printOn(StringBuffer buffer);
String toString() => "$debugName(${printOn(new StringBuffer())})";
TypeBuilder subst(Map<TypeVariableBuilder, TypeBuilder> substitution) => this;
build();
}