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

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

Issue 2839403004: change fasta.Token.isIdentifier() from method to getter (Closed)
Patch Set: rebase 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
« no previous file with comments | « pkg/front_end/lib/src/fasta/scanner/error_token.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 92e4b1eb6300927e6fd6a0af73675d4af74c9ff0..f5a27240918bd5a62ef5c8b7472f2c55a5df89a4 100644
--- a/pkg/front_end/lib/src/fasta/scanner/token.dart
+++ b/pkg/front_end/lib/src/fasta/scanner/token.dart
@@ -101,7 +101,7 @@ abstract class Token implements analyzer.TokenWithComment {
* True if this token is an identifier. Some keywords allowed as identifiers,
* see implementation in [KeywordToken].
*/
- bool isIdentifier();
+ bool get isIdentifier;
bool get isPseudo => false;
@@ -262,7 +262,7 @@ class SymbolToken extends Token {
String get stringValue => info.value;
@override
- bool isIdentifier() => false;
+ bool get isIdentifier => false;
@override
String toString() => "SymbolToken(${isEof ? '-eof-' : lexeme})";
@@ -336,7 +336,7 @@ class KeywordToken extends Token implements analyzer.KeywordTokenWithComment {
String get stringValue => keyword.lexeme;
- bool isIdentifier() => keyword.isPseudo || keyword.isBuiltIn;
+ bool get isIdentifier => keyword.isPseudo || keyword.isBuiltIn;
bool get isPseudo => keyword.isPseudo;
@@ -464,7 +464,7 @@ class StringToken extends Token implements analyzer.StringTokenWithComment {
/// See [Token.stringValue] for an explanation.
String get stringValue => null;
- bool isIdentifier() => identical(kind, IDENTIFIER_TOKEN);
+ bool get isIdentifier => identical(kind, IDENTIFIER_TOKEN);
String toString() => "StringToken($lexeme)";
« no previous file with comments | « pkg/front_end/lib/src/fasta/scanner/error_token.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698