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

Unified Diff: pkg/front_end/lib/src/fasta/scanner/keyword.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 | « no previous file | pkg/front_end/lib/src/fasta/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/keyword.dart
diff --git a/pkg/front_end/lib/src/fasta/scanner/keyword.dart b/pkg/front_end/lib/src/fasta/scanner/keyword.dart
index c643e7d246388319c6478bb38971e676ddbbc328..f1c85280770c98cb4efc05174884bbead2292d92 100644
--- a/pkg/front_end/lib/src/fasta/scanner/keyword.dart
+++ b/pkg/front_end/lib/src/fasta/scanner/keyword.dart
@@ -72,7 +72,7 @@ class Keyword implements analyzer.Keyword {
static const ASYNC = const Keyword("async", isPseudo: true);
static const AWAIT = const Keyword("await", isPseudo: true);
- static const DEFERRED = const Keyword("deferred", isPseudo: true);
+ static const DEFERRED = const Keyword("deferred", isBuiltIn: true);
static const FUNCTION = const Keyword("Function", isPseudo: true);
static const HIDE = const Keyword("hide", isPseudo: true);
static const NATIVE = const Keyword("native", isPseudo: true);
@@ -123,6 +123,7 @@ class Keyword implements analyzer.Keyword {
ABSTRACT,
AS,
COVARIANT,
+ DEFERRED,
DYNAMIC,
EXPORT,
EXTERNAL,
@@ -139,7 +140,6 @@ class Keyword implements analyzer.Keyword {
// ==== Pseudo
ASYNC,
AWAIT,
- DEFERRED,
FUNCTION,
HIDE,
NATIVE,
@@ -178,16 +178,13 @@ class Keyword implements analyzer.Keyword {
String toString() => syntax;
+ /// The term "pseudo-keyword" doesn't exist in the spec, and
+ /// Analyzer and Fasta have different notions of what it means.
+ /// Analyzer's notion of "pseudo-keyword" corresponds with Fasta's
+ /// notion of "built-in keyword".
+ /// Use [isBuiltIn] instead.
@override
- bool get isPseudoKeyword {
- // The term "pseudo-keyword" doesn't exist in the spec, and
- // Analyzer and Fasta have different notions of what it means.
- // Analyzer's notion of "pseudo-keyword" corresponds with Fasta's
- // notion of "built-in keyword".
-
- // TODO(danrubel) remove `this == DEFERRED` once dartbug.com/29069 is fixed.
- return isBuiltIn || this == DEFERRED;
- }
+ bool get isPseudoKeyword => isBuiltIn;
@override
String get name => syntax.toUpperCase();
« no previous file with comments | « no previous file | pkg/front_end/lib/src/fasta/scanner/token.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698