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

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

Issue 2848493003: remove TokenType.KEYWORD (Closed)
Patch Set: rebase 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
« no previous file with comments | « no previous file | pkg/front_end/lib/src/scanner/token.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 0a63bd9f5a89b92c4b16623e0b99309834b7cff1..2cee8a64c587409d8c4b85ac11cabbf254e77987 100644
--- a/pkg/front_end/lib/src/fasta/scanner/token.dart
+++ b/pkg/front_end/lib/src/fasta/scanner/token.dart
@@ -142,12 +142,7 @@ abstract class Token implements analyzer.TokenWithComment {
bool get isUserDefinableOperator => info.isUserDefinableOperator;
@override
- analyzer.TokenType get type {
- // Analyzer has a different concept of what is a Keyword type.
- return info == TokenType.AS || info == TokenType.IS
- ? TokenType.KEYWORD
- : info;
- }
+ analyzer.TokenType get type => info;
@override
int get offset => charOffset;
@@ -330,7 +325,7 @@ class KeywordToken extends Token implements analyzer.KeywordTokenWithComment {
KeywordToken(this.keyword, int charOffset) : super(charOffset);
- TokenType get info => keyword.info;
+ TokenType get info => keyword;
String get lexeme => keyword.lexeme;
@@ -351,7 +346,7 @@ class KeywordToken extends Token implements analyzer.KeywordTokenWithComment {
analyzer.Keyword value() => keyword;
@override
- analyzer.TokenType get type => TokenType.KEYWORD;
+ analyzer.TokenType get type => keyword;
}
/**
« no previous file with comments | « no previous file | pkg/front_end/lib/src/scanner/token.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698