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

Unified Diff: dart/lib/compiler/implementation/scanner/listener.dart

Issue 10928109: Unbreak the parser. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 years, 3 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 | dart/lib/compiler/implementation/scanner/parser.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: dart/lib/compiler/implementation/scanner/listener.dart
diff --git a/dart/lib/compiler/implementation/scanner/listener.dart b/dart/lib/compiler/implementation/scanner/listener.dart
index e8eca74491af35364fdc8c86670f68470f094ccf..1b549f898e7922fed8a4ff5ae75149c1b1c325a2 100644
--- a/dart/lib/compiler/implementation/scanner/listener.dart
+++ b/dart/lib/compiler/implementation/scanner/listener.dart
@@ -493,6 +493,11 @@ class Listener {
return skipToEof(token);
}
+ Token unmatched(Token token) {
+ error("unmatched '${token.slowToString()}'", token);
+ return skipToEof(token);
+ }
+
skipToEof(Token token) {
while (token.info !== EOF_INFO) {
token = token.next;
@@ -826,6 +831,11 @@ class ElementListener extends Listener {
}
}
+ Token unmatched(Token token) {
+ listener.cancel("unmatched '${token.slowToString()}'", token: token);
+ return skipToEof(token);
+ }
+
void recoverableError(String message, [Token token, Node node]) {
listener.cancel(message, token: token, node: node);
}
« no previous file with comments | « no previous file | dart/lib/compiler/implementation/scanner/parser.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698