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

Unified Diff: pkg/analyzer/lib/src/generated/resolver.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/generated/resolver.dart
diff --git a/pkg/analyzer/lib/src/generated/resolver.dart b/pkg/analyzer/lib/src/generated/resolver.dart
index 7517a49d12fca8571a4839c55602c9f36eabd2c9..094fa8733eca3c23649fdd8d02223df1b0d3a8fc 100644
--- a/pkg/analyzer/lib/src/generated/resolver.dart
+++ b/pkg/analyzer/lib/src/generated/resolver.dart
@@ -2395,9 +2395,9 @@ class DeclarationResolver extends RecursiveAstVisitor<Object>
accessors = _enclosingUnit.accessors;
}
PropertyAccessorElement accessor;
- if ((property as KeywordToken).keyword == Keyword.GET) {
+ if (property.keyword == Keyword.GET) {
accessor = _findIdentifier(accessors, functionName);
- } else if ((property as KeywordToken).keyword == Keyword.SET) {
+ } else if (property.keyword == Keyword.SET) {
accessor = _findWithNameAndOffset(accessors, functionName,
functionName.name + '=', functionName.offset);
_expectedElements.remove(accessor);
@@ -2508,9 +2508,9 @@ class DeclarationResolver extends RecursiveAstVisitor<Object>
methodName.staticElement = _enclosingExecutable;
} else {
PropertyAccessorElement accessor;
- if ((property as KeywordToken).keyword == Keyword.GET) {
+ if (property.keyword == Keyword.GET) {
accessor = _findIdentifier(_enclosingClass.accessors, methodName);
- } else if ((property as KeywordToken).keyword == Keyword.SET) {
+ } else if (property.keyword == Keyword.SET) {
accessor = _findWithNameAndOffset(_enclosingClass.accessors,
methodName, nameOfMethod + '=', methodName.offset);
_expectedElements.remove(accessor);

Powered by Google App Engine
This is Rietveld 408576698