Index: pkg/front_end/lib/src/fasta/analyzer/ast_builder.dart |
diff --git a/pkg/front_end/lib/src/fasta/analyzer/ast_builder.dart b/pkg/front_end/lib/src/fasta/analyzer/ast_builder.dart |
index b75cb180b3dd0acf1d9e30a0ea62442686a76683..3c4ecbedd5802ebb41740f97371ce08f3a71618d 100644 |
--- a/pkg/front_end/lib/src/fasta/analyzer/ast_builder.dart |
+++ b/pkg/front_end/lib/src/fasta/analyzer/ast_builder.dart |
@@ -995,6 +995,28 @@ class AstBuilder extends ScopeListener { |
push(ast.topLevelVariableDeclaration( |
comment, metadata, variableList, toAnalyzerToken(endToken))); |
} |
+ |
+ @override |
+ void endTypeVariable(Token token, Token extendsOrSuper) { |
scheglov
2017/02/21 19:19:26
What means "OrSuper" here?
Did I miss something fr
Paul Berry
2017/02/21 20:00:25
I copied it from the base class. I think it's a s
ahe
2017/02/22 10:35:45
Yes. This is a bug.
|
+ // TODO(paulberry): set up scopes properly to resolve parameters and type |
+ // variables. Note that this is tricky due to the handling of initializers |
+ // in constructors, so the logic should be shared with BodyBuilder as much |
+ // as possible. |
+ debugEvent("TypeVariable"); |
+ TypeAnnotation bound = pop(); |
+ SimpleIdentifier name = pop(); |
+ List<Annotation> metadata = null; // TODO(paulberry) |
+ Comment comment = null; // TODO(paulberry) |
+ push(ast.typeParameter( |
+ comment, metadata, name, toAnalyzerToken(extendsOrSuper), bound)); |
+ } |
+ |
+ void endTypeVariables(int count, Token beginToken, Token endToken) { |
scheglov
2017/02/21 19:19:26
@override?
Paul Berry
2017/02/21 20:00:24
Done.
|
+ debugEvent("TypeVariables"); |
+ List<TypeParameter> typeParameters = popList(count); |
+ push(ast.typeParameterList(toAnalyzerToken(beginToken), typeParameters, |
+ toAnalyzerToken(endToken))); |
+ } |
} |
/// Data structure placed on the stack to represent a class body. |