Commit 1cc5bb6a authored by Toon Verwaest's avatar Toon Verwaest Committed by Commit Bot

[parser] Drop undefined as a contextual keyword

Change-Id: I6e8c72ea46e02361b7dd8ae698f3c13aef8a8beb
Reviewed-on: https://chromium-review.googlesource.com/c/1332297
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Reviewed-by: 's avatarIgor Sheludko <ishell@chromium.org>
Reviewed-by: 's avatarSathya Gunasekaran <gsathya@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57462}
parent 41e39158
......@@ -221,8 +221,6 @@ static const Token::Value one_char_tokens[] = {
KEYWORD("true", Token::TRUE_LITERAL) \
KEYWORD("try", Token::TRY) \
KEYWORD("typeof", Token::TYPEOF) \
KEYWORD_GROUP('u') \
KEYWORD("undefined", Token::UNDEFINED) \
KEYWORD_GROUP('v') \
KEYWORD("var", Token::VAR) \
KEYWORD("void", Token::VOID) \
......
......@@ -206,8 +206,7 @@ namespace internal {
C(NAME, "name", 0) \
C(CONSTRUCTOR, "constructor", 0) \
C(PRIVATE_CONSTRUCTOR, "#constructor", 0) \
C(PROTOTYPE, "prototype", 0) \
C(UNDEFINED, "undefined", 0)
C(PROTOTYPE, "prototype", 0)
class Token {
public:
......@@ -228,7 +227,7 @@ class Token {
// Predicates
static bool IsKeyword(Value token) { return token_type[token] == 'K'; }
static bool IsContextualKeyword(Value token) {
return IsInRange(token, GET, UNDEFINED);
return IsInRange(token, GET, PROTOTYPE);
}
static bool IsIdentifier(Value token, LanguageMode language_mode,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment