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

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

Issue 2799133003: enhance analyzer to parse uppercase and built-in/pseudo keywords (Closed)
Patch Set: 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
Index: pkg/front_end/lib/src/scanner/token.dart
diff --git a/pkg/front_end/lib/src/scanner/token.dart b/pkg/front_end/lib/src/scanner/token.dart
index 65b1d9217e54a5a9c0ef66d28c572561fd0c053a..81a8252c2274240f3a9b6b123108eb8281aec846 100644
--- a/pkg/front_end/lib/src/scanner/token.dart
+++ b/pkg/front_end/lib/src/scanner/token.dart
@@ -156,6 +156,10 @@ abstract class Keyword {
static const Keyword ASSERT = fasta.Keyword.ASSERT;
+ static const Keyword ASYNC = fasta.Keyword.ASYNC;
+
+ static const Keyword AWAIT = fasta.Keyword.AWAIT;
+
static const Keyword BREAK = fasta.Keyword.BREAK;
static const Keyword CASE = fasta.Keyword.CASE;
@@ -198,8 +202,12 @@ abstract class Keyword {
static const Keyword FOR = fasta.Keyword.FOR;
+ static const Keyword FUNCTION = fasta.Keyword.FUNCTION;
+
static const Keyword GET = fasta.Keyword.GET;
+ static const Keyword HIDE = fasta.Keyword.HIDE;
+
static const Keyword IF = fasta.Keyword.IF;
static const Keyword IMPLEMENTS = fasta.Keyword.IMPLEMENTS;
@@ -212,26 +220,40 @@ abstract class Keyword {
static const Keyword LIBRARY = fasta.Keyword.LIBRARY;
+ static const Keyword NATIVE = fasta.Keyword.NATIVE;
+
static const Keyword NEW = fasta.Keyword.NEW;
static const Keyword NULL = fasta.Keyword.NULL;
+ static const Keyword OF = fasta.Keyword.OF;
+
+ static const Keyword ON = fasta.Keyword.ON;
+
static const Keyword OPERATOR = fasta.Keyword.OPERATOR;
static const Keyword PART = fasta.Keyword.PART;
+ static const Keyword PATCH = fasta.Keyword.PATCH;
+
static const Keyword RETHROW = fasta.Keyword.RETHROW;
static const Keyword RETURN = fasta.Keyword.RETURN;
static const Keyword SET = fasta.Keyword.SET;
+ static const Keyword SHOW = fasta.Keyword.SHOW;
+
+ static const Keyword SOURCE = fasta.Keyword.SOURCE;
+
static const Keyword STATIC = fasta.Keyword.STATIC;
static const Keyword SUPER = fasta.Keyword.SUPER;
static const Keyword SWITCH = fasta.Keyword.SWITCH;
+ static const Keyword SYNC = fasta.Keyword.SYNC;
+
static const Keyword THIS = fasta.Keyword.THIS;
static const Keyword THROW = fasta.Keyword.THROW;
@@ -250,10 +272,14 @@ abstract class Keyword {
static const Keyword WITH = fasta.Keyword.WITH;
+ static const Keyword YIELD = fasta.Keyword.YIELD;
+
static const List<Keyword> values = const <Keyword>[
ABSTRACT,
AS,
ASSERT,
+ ASYNC,
+ AWAIT,
BREAK,
CASE,
CATCH,
@@ -275,23 +301,32 @@ abstract class Keyword {
FINAL,
FINALLY,
FOR,
+ FUNCTION,
GET,
+ HIDE,
IF,
IMPLEMENTS,
IMPORT,
IN,
IS,
LIBRARY,
+ NATIVE,
NEW,
NULL,
+ OF,
+ ON,
OPERATOR,
PART,
+ PATCH,
RETHROW,
RETURN,
SET,
+ SHOW,
+ SOURCE,
STATIC,
SUPER,
SWITCH,
+ SYNC,
THIS,
THROW,
TRUE,
@@ -301,6 +336,7 @@ abstract class Keyword {
VOID,
WHILE,
WITH,
+ YIELD,
];
/**
@@ -334,6 +370,8 @@ abstract class Keyword {
this.isPseudo: false,
this.info: fasta.KEYWORD_INFO});
+ bool get isBuiltInOrPseudo => isBuiltIn || isPseudo;
+
/**
* A flag indicating whether the keyword is "built-in" identifier.
* This method exists for backward compatibility and will be removed.

Powered by Google App Engine
This is Rietveld 408576698