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

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

Issue 2769253002: change "deferred" keyword isPseudo --> isBuiltIn (Closed)
Patch Set: rebase 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/scanner/keyword.dart ('k') | pkg/front_end/test/scanner_roundtrip_test.dart » ('j') | 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 a380e48250348246fc5fa8e3e4407f0e68a7baf0..467f55d36447631e9835a61714e8a4edaebde9f1 100644
--- a/pkg/front_end/lib/src/fasta/scanner/token.dart
+++ b/pkg/front_end/lib/src/fasta/scanner/token.dart
@@ -317,11 +317,7 @@ class KeywordToken extends Token {
bool get isPseudo => keyword.isPseudo;
- bool get isBuiltInIdentifier {
- // TODO(ahe): Remove special case for "deferred" once dartbug.com/29069 is
- // fixed.
- return keyword.isBuiltIn || identical("deferred", lexeme);
- }
+ bool get isBuiltInIdentifier => keyword.isBuiltIn;
String toString() => "KeywordToken($lexeme)";
@@ -329,22 +325,12 @@ class KeywordToken extends Token {
Token copyWithoutComments() => new KeywordToken(keyword, charOffset);
@override
- Object value() {
- // Analyzer has different set of keyword tokens
- // TODO(danrubel): Remove special case for "deferred" once dartbug.com/29069
- // is fixed.
- return isPseudo && !identical("deferred", lexeme) ? lexeme : keyword;
- }
+ // Analyzer considers pseudo-keywords to have a different value
+ Object value() => isPseudo ? lexeme : keyword;
@override
- analyzer.TokenType get type {
- // Analyzer considers pseudo-keywords to be identifiers
- // TODO(danrubel): Remove special case for "deferred" once dartbug.com/29069
- // is fixed.
- return isPseudo && !identical("deferred", lexeme)
- ? IDENTIFIER_INFO
- : KEYWORD_INFO;
- }
+ // Analyzer considers pseudo-keywords to be identifiers
+ analyzer.TokenType get type => isPseudo ? IDENTIFIER_INFO : KEYWORD_INFO;
}
/**
« no previous file with comments | « pkg/front_end/lib/src/fasta/scanner/keyword.dart ('k') | pkg/front_end/test/scanner_roundtrip_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698