Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(9)

Unified Diff: pkg/analyzer/lib/src/fasta/ast_builder.dart

Issue 2985673002: Parse type variables of local functions before return type. (Closed)
Patch Set: Created 3 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: pkg/analyzer/lib/src/fasta/ast_builder.dart
diff --git a/pkg/analyzer/lib/src/fasta/ast_builder.dart b/pkg/analyzer/lib/src/fasta/ast_builder.dart
index 246972e45dbb854fdec7b6f532771a3d4374fc30..8a2c5565d6a6048b9a1cb2e0b65b9f1ac420fa1c 100644
--- a/pkg/analyzer/lib/src/fasta/ast_builder.dart
+++ b/pkg/analyzer/lib/src/fasta/ast_builder.dart
@@ -1533,12 +1533,12 @@ class AstBuilder extends ScopeListener {
pop(); // constructor initializers
pop(); // separator before constructor initializers
FormalParameterList parameters = pop();
- TypeParameterList typeParameters = pop();
- FunctionExpression functionExpression =
- ast.functionExpression(typeParameters, parameters, body);
SimpleIdentifier name = pop();
TypeAnnotation returnType = pop();
pop(); // modifiers
+ TypeParameterList typeParameters = pop();
+ FunctionExpression functionExpression =
+ ast.functionExpression(typeParameters, parameters, body);
push(ast.functionDeclarationStatement(ast.functionDeclaration(
null, null, null, returnType, null, name, functionExpression)));
}
« no previous file with comments | « no previous file | pkg/compiler/lib/src/parser/node_listener.dart » ('j') | pkg/front_end/lib/src/fasta/parser/parser.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698