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

Unified Diff: pkg/front_end/lib/src/fasta/source/diet_listener.dart

Issue 2802753002: Include ':' before constructor separators into AST 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
Index: pkg/front_end/lib/src/fasta/source/diet_listener.dart
diff --git a/pkg/front_end/lib/src/fasta/source/diet_listener.dart b/pkg/front_end/lib/src/fasta/source/diet_listener.dart
index 0b7b385aeceee14412a2055a184a67c73e8eb74d..51b1e3632d065ebf6d70db604796972b29a99c3c 100644
--- a/pkg/front_end/lib/src/fasta/source/diet_listener.dart
+++ b/pkg/front_end/lib/src/fasta/source/diet_listener.dart
@@ -493,8 +493,9 @@ class DietListener extends StackListener {
bool allowAbstract = asyncModifier == AsyncMarker.Sync;
parser.parseFunctionBody(token, isExpression, allowAbstract);
var body = listener.pop();
- if (listener.stack.length == 1) {
+ if (listener.stack.length == 2) {
listener.pop(); // constructor initializers
+ listener.pop(); // separator before constructor initializers
}
listener.checkEmpty(token.charOffset);
listener.finishFunction(formals, asyncModifier, body);
« no previous file with comments | « pkg/analyzer/test/generated/parser_test.dart ('k') | pkg/front_end/lib/src/fasta/source/stack_listener.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698