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

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

Issue 2750863002: Complain about built-in identifiers. (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 | « pkg/front_end/lib/src/fasta/parser/parser.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/front_end/lib/src/fasta/scanner/token.dart
diff --git a/pkg/front_end/lib/src/fasta/scanner/token.dart b/pkg/front_end/lib/src/fasta/scanner/token.dart
index 6cacd012d2b5b5260dfdc555b6dcdb902a9094c9..67dacdc330af37923ca8c30896f7f95ed6a4bfec 100644
--- a/pkg/front_end/lib/src/fasta/scanner/token.dart
+++ b/pkg/front_end/lib/src/fasta/scanner/token.dart
@@ -123,6 +123,8 @@ abstract class Token {
int get charEnd => charOffset + charCount;
bool get isEof => false;
+
+ bool get isBuiltInIdentifier => false;
}
/**
@@ -174,6 +176,10 @@ class KeywordToken extends Token {
bool isIdentifier() => keyword.isPseudo || keyword.isBuiltIn;
+ bool get isBuiltInIdentifier {
+ return keyword.isBuiltIn || identical("deferred", lexeme);
danrubel 2017/03/14 15:21:43 Similar to what Paul recommended in the fasta.Keyw
ahe 2017/03/14 15:24:35 Yes. That's how I knew about this case :-) I'll a
+ }
+
String toString() => "KeywordToken($lexeme)";
}
« no previous file with comments | « pkg/front_end/lib/src/fasta/parser/parser.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698