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

Unified Diff: src/preparser.h

Issue 671913002: harmony-scoping: Allow 'const' iteration variables in strict mode. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Remove assertion (checked downstream) Created 6 years, 2 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
« no previous file with comments | « src/parser.cc ('k') | src/preparser.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
« no previous file with comments | « src/parser.cc ('k') | src/preparser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698