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

Unified Diff: pkg/front_end/lib/src/fasta/scanner/abstract_scanner.dart

Issue 2922563002: improve handling of missing interpolation identifier (Closed)
Patch Set: Created 3 years, 7 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
Index: pkg/front_end/lib/src/fasta/scanner/abstract_scanner.dart
diff --git a/pkg/front_end/lib/src/fasta/scanner/abstract_scanner.dart b/pkg/front_end/lib/src/fasta/scanner/abstract_scanner.dart
index 343ea4da7da466ccd0878ffc01ca5736c7cc907a..07b462190fa00be995dac8b3300a9303c186383f 100644
--- a/pkg/front_end/lib/src/fasta/scanner/abstract_scanner.dart
+++ b/pkg/front_end/lib/src/fasta/scanner/abstract_scanner.dart
@@ -1083,6 +1083,8 @@ abstract class AbstractScanner implements Scanner {
beginToken(); // The identifier starts here.
next = tokenizeKeywordOrIdentifier(next, false);
} else {
+ beginToken(); // The synthetic identifier starts here.
+ appendSyntheticSubstringToken(TokenType.IDENTIFIER, scanOffset, true, '');
unterminated(r'$', shouldAdvance: false);
}
beginToken(); // The string interpolation suffix starts here.
« no previous file with comments | « no previous file | pkg/front_end/lib/src/fasta/scanner/recover.dart » ('j') | pkg/front_end/lib/src/fasta/scanner/recover.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698