Index: src/token.h |
=================================================================== |
--- src/token.h (revision 5191) |
+++ src/token.h (working copy) |
@@ -220,6 +220,10 @@ |
} |
// 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 @@ |
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 |