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

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

Issue 2797303003: Fix for parsing annotations before variables in for-loop with Fasta. (Closed)
Patch Set: Created 3 years, 8 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
« no previous file with comments | « no previous file | pkg/analyzer/test/generated/parser_fasta_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 1308feea31b15ad0a4826159aa6bd47113c2591e..494bbe621902833fc08224ef6715fff5fa0ffdd3 100644
--- a/pkg/analyzer/lib/src/fasta/ast_builder.dart
+++ b/pkg/analyzer/lib/src/fasta/ast_builder.dart
@@ -532,11 +532,11 @@ class AstBuilder extends ScopeListener {
TypeAnnotation type = pop();
_Modifiers modifiers = pop();
Token keyword = modifiers?.finalConstOrVarKeyword;
- pop(); // Metadata.
- pop(); // Comment.
+ List<Annotation> metadata = pop();
+ Comment comment = pop();
push(ast.variableDeclarationStatement(
ast.variableDeclarationList(
- null, null, toAnalyzerToken(keyword), type, variables),
+ comment, metadata, toAnalyzerToken(keyword), type, variables),
toAnalyzerToken(endToken)));
}
« no previous file with comments | « no previous file | pkg/analyzer/test/generated/parser_fasta_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698