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

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

Issue 2799133003: enhance analyzer to parse uppercase and built-in/pseudo keywords (Closed)
Patch Set: Created 3 years, 8 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/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 cb5e1d67745466e31a4340fd38f340253fe1e6f7..891cd302c4b7632a54cdfc3faa9b9e5dea53195f 100644
--- a/pkg/front_end/lib/src/fasta/scanner/token.dart
+++ b/pkg/front_end/lib/src/fasta/scanner/token.dart
@@ -13,7 +13,6 @@ import 'precedence.dart'
AS_INFO,
BAD_INPUT_INFO,
EOF_INFO,
- IDENTIFIER_INFO,
IS_INFO,
KEYWORD_INFO,
PrecedenceInfo;
@@ -358,12 +357,10 @@ class KeywordToken extends Token implements analyzer.KeywordTokenWithComment {
Token copyWithoutComments() => new KeywordToken(keyword, charOffset);
@override
- // Analyzer considers pseudo-keywords to have a different value
- Object value() => isPseudo ? lexeme : keyword;
+ Keyword value() => keyword;
@override
- // Analyzer considers pseudo-keywords to be identifiers
- analyzer.TokenType get type => isPseudo ? IDENTIFIER_INFO : KEYWORD_INFO;
+ analyzer.TokenType get type => KEYWORD_INFO;
}
/**

Powered by Google App Engine
This is Rietveld 408576698