Index: pkg/dart_parser/lib/src/listener.dart |
diff --git a/pkg/dart_parser/lib/src/listener.dart b/pkg/dart_parser/lib/src/listener.dart |
index bf9e25b1ea5fdc861d82fdeceb8757bc19bc89d2..18fa8d68a5350f87f90d5dc0292678155214df6c 100644 |
--- a/pkg/dart_parser/lib/src/listener.dart |
+++ b/pkg/dart_parser/lib/src/listener.dart |
@@ -342,6 +342,27 @@ class Listener { |
logEvent("NoInitializers"); |
} |
+ /// Called after the listener has recovered from an invalid expression. The |
+ /// parser will resume parsing from [token]. Exactly where the parser will |
+ /// resume parsing is unspecified. |
+ void handleInvalidExpression(Token token) { |
+ logEvent("InvalidExpression"); |
+ } |
+ |
+ /// Called after the listener has recovered from an invalid function |
+ /// body. The parser expected an open curly brace `{` and will resume parsing |
+ /// from [token] as if a function body had preceeded it. |
+ void handleInvalidFunctionBody(Token token) { |
+ logEvent("InvalidFunctionBody"); |
+ } |
+ |
+ /// Called after the listener has recovered from an invalid type. The parser |
+ /// expected an identifier, and will resume parsing type arguments from |
+ /// [token]. |
+ void handleInvalidTypeReference(Token token) { |
+ logEvent("InvalidTypeReference"); |
+ } |
+ |
void handleLabel(Token token) { |
logEvent("Label"); |
} |