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

Unified Diff: pkg/front_end/lib/src/fasta/parser/listener.dart

Issue 2744843003: Create a special PrecedenceInfo for use during parser recovery. (Closed)
Patch Set: Created 3 years, 9 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 | pkg/front_end/lib/src/fasta/scanner/precedence.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/front_end/lib/src/fasta/parser/listener.dart
diff --git a/pkg/front_end/lib/src/fasta/parser/listener.dart b/pkg/front_end/lib/src/fasta/parser/listener.dart
index 8fb9eb86720cbe5ab05d1384aa2cb5f6dbd7fdd2..27f8e993e70fac820524ca41910e57a959f6d7b4 100644
--- a/pkg/front_end/lib/src/fasta/parser/listener.dart
+++ b/pkg/front_end/lib/src/fasta/parser/listener.dart
@@ -9,7 +9,7 @@ import '../scanner/token.dart' show BeginGroupToken, SymbolToken, Token;
import '../util/link.dart' show Link;
import 'error_kind.dart' show ErrorKind;
-import 'package:front_end/src/fasta/scanner/precedence.dart' show EOF_INFO;
+import 'package:front_end/src/fasta/scanner/precedence.dart' show RECOVERY_INFO;
import 'parser.dart' show FormalParameterType;
import 'identifier_context.dart' show IdentifierContext;
@@ -989,9 +989,7 @@ class Listener {
/// If [next] is `null`, `null` is returned.
Token newSyntheticToken(Token next) {
if (next == null) return null;
- // TODO(paulberry): we really should have a new kind here. Don't re-use
- // EOF_INFO.
- return new SymbolToken(EOF_INFO, next.charOffset)..next = next;
+ return new SymbolToken(RECOVERY_INFO, next.charOffset)..next = next;
}
}
« no previous file with comments | « no previous file | pkg/front_end/lib/src/fasta/scanner/precedence.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698