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

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

Issue 2872433005: more work aligning fasta.Token with analyzer.Token (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/error_token.dart
diff --git a/pkg/front_end/lib/src/fasta/scanner/error_token.dart b/pkg/front_end/lib/src/fasta/scanner/error_token.dart
index 84a7ec61e0530b6bcec923df34e60a36949a09e0..6fe80fe12fabbaf1abc622c84555170e78e02014 100644
--- a/pkg/front_end/lib/src/fasta/scanner/error_token.dart
+++ b/pkg/front_end/lib/src/fasta/scanner/error_token.dart
@@ -71,6 +71,11 @@ abstract class ErrorToken extends Token {
TokenType get type => TokenType.BAD_INPUT;
+ /// This is a token that wraps around an error message. Return 1
+ /// instead of the size of the length of the error message.
+ @override
+ int get charCount => 1;
+
String get lexeme => throw assertionMessage;
bool get isIdentifier => false;

Powered by Google App Engine
This is Rietveld 408576698