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

Unified Diff: pkg/dart_parser/lib/src/listener.dart

Issue 2647343003: Update dart2js unit tests to dart_parser and dart_scanner. (Closed)
Patch Set: Address review comments. Created 3 years, 11 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 | « pkg/dart2js_incremental/lib/watcher.dart ('k') | pkg/dart_parser/lib/src/parser.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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");
}
« no previous file with comments | « pkg/dart2js_incremental/lib/watcher.dart ('k') | pkg/dart_parser/lib/src/parser.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698