Index: src/preparser.h |
diff --git a/src/preparser.h b/src/preparser.h |
index fd82651a7e012a88c7e09c58c53732522853d121..a53abfe4ff3af732cd2cd46ac79db8c35264f698 100644 |
--- a/src/preparser.h |
+++ b/src/preparser.h |
@@ -344,14 +344,18 @@ class ParserBase : public Traits { |
} |
bool CheckContextualKeyword(Vector<const char> keyword) { |
- if (peek() == Token::IDENTIFIER && |
- scanner()->is_next_contextual_keyword(keyword)) { |
+ if (PeekContextualKeyword(keyword)) { |
Consume(Token::IDENTIFIER); |
return true; |
} |
return false; |
} |
+ bool PeekContextualKeyword(Vector<const char> keyword) { |
+ return peek() == Token::IDENTIFIER && |
+ scanner()->is_next_contextual_keyword(keyword); |
+ } |
+ |
void ExpectContextualKeyword(Vector<const char> keyword, bool* ok) { |
Expect(Token::IDENTIFIER, ok); |
if (!*ok) return; |