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

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

Issue 2985703002: new handleInvalidTopLevelDeclaration event in fasta parser (Closed)
Patch Set: cleanup forwarding listener - enclosingEvent Created 3 years, 4 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 31d4daa38e094325d76082a9726969dc28880dcb..5c2a211b8ee883f3adbbc13b129a810ea180ebfd 100644
--- a/pkg/front_end/lib/src/fasta/source/diet_listener.dart
+++ b/pkg/front_end/lib/src/fasta/source/diet_listener.dart
@@ -89,6 +89,12 @@ class DietListener extends StackListener {
}
@override
+ void handleInvalidTopLevelDeclaration(Token beginToken, Token endToken) {
+ debugEvent("InvalidTopLevelDeclaration");
+ pop(); // metadata star
+ }
+
+ @override
void endMetadata(Token beginToken, Token periodBeforeName, Token endToken) {
debugEvent("Metadata");
discard(periodBeforeName == null ? 1 : 2);

Powered by Google App Engine
This is Rietveld 408576698