Index: src/token.h |
diff --git a/src/token.h b/src/token.h |
index 2a228d67cf422f2b6dd623e2105ea082f4595b5e..0d8960b8ee48ad4bc84cd5f5f4d50c4ac7075167 100644 |
--- a/src/token.h |
+++ b/src/token.h |
@@ -220,6 +220,10 @@ class Token { |
} |
// Predicates |
+ static bool IsKeyword(Value tok) { |
+ return token_type[tok] == 'K'; |
+ } |
+ |
static bool IsAssignmentOp(Value tok) { |
return INIT_VAR <= tok && tok <= ASSIGN_MOD; |
} |
@@ -263,6 +267,7 @@ class Token { |
static const char* name_[NUM_TOKENS]; |
static const char* string_[NUM_TOKENS]; |
static int8_t precedence_[NUM_TOKENS]; |
+ static const char token_type[NUM_TOKENS]; |
}; |
} } // namespace v8::internal |