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

Unified Diff: pkg/front_end/test/fasta/parser/token_stream_rewriter_test.dart

Issue 2767083002: fasta scanner recovery and error code translation improvements (Closed)
Patch Set: revert address comments and fix for token_stream_rewriter test 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 | « pkg/front_end/lib/src/scanner/errors.dart ('k') | pkg/front_end/test/scanner_replacement_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/front_end/test/fasta/parser/token_stream_rewriter_test.dart
diff --git a/pkg/front_end/test/fasta/parser/token_stream_rewriter_test.dart b/pkg/front_end/test/fasta/parser/token_stream_rewriter_test.dart
index 15f7afd0be5cc0cf8a22bfc9e0bf8dadcd030eeb..6d30d44b6b38441739788e18d2c85f291ac479bb 100644
--- a/pkg/front_end/test/fasta/parser/token_stream_rewriter_test.dart
+++ b/pkg/front_end/test/fasta/parser/token_stream_rewriter_test.dart
@@ -104,7 +104,8 @@ abstract class TokenStreamRewriterTest {
///
/// The EOF token is returned.
Token _link(Iterable<Token> tokens) {
- Token head = new SymbolToken(EOF_INFO, -1);
+ Token head = new SymbolToken.eof(-1);
+ if (!setPrevious) head.previousToken = null;
for (var token in tokens) {
head.next = token;
if (setPrevious) token.previousToken = head;
@@ -112,7 +113,8 @@ abstract class TokenStreamRewriterTest {
}
int eofOffset = head.charOffset + head.lexeme.length;
if (eofOffset < 0) eofOffset = 0;
- Token eof = new SymbolToken(EOF_INFO, eofOffset);
+ Token eof = new SymbolToken.eof(eofOffset);
+ if (!setPrevious) eof.previousToken = null;
head.next = eof;
if (setPrevious) eof.previousToken = head;
return eof;
« no previous file with comments | « pkg/front_end/lib/src/scanner/errors.dart ('k') | pkg/front_end/test/scanner_replacement_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698