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

Unified Diff: pkg/analyzer/lib/src/dart/ast/token.dart

Issue 1909843002: Pull the 'keyword' property into Token. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 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/analyzer/lib/src/dart/ast/token.dart
diff --git a/pkg/analyzer/lib/src/dart/ast/token.dart b/pkg/analyzer/lib/src/dart/ast/token.dart
index 1791990e53cfb54a65be3b44962e2eea0281a9e5..39a3ab5954637d1ef912b4e82d7e86f053d9480d 100644
--- a/pkg/analyzer/lib/src/dart/ast/token.dart
+++ b/pkg/analyzer/lib/src/dart/ast/token.dart
@@ -142,9 +142,7 @@ class DocumentationCommentToken extends CommentToken {
* A token representing a keyword in the language.
*/
class KeywordToken extends SimpleToken {
- /**
- * The keyword being represented by this token.
- */
+ @override
final Keyword keyword;
/**
@@ -253,6 +251,9 @@ class SimpleToken implements Token {
bool get isUserDefinableOperator => type.isUserDefinableOperator;
@override
+ Keyword get keyword => null;
+
+ @override
int get length => lexeme.length;
@override

Powered by Google App Engine
This is Rietveld 408576698