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

Unified Diff: src/parsing/parser-base.h

Issue 2695973003: ParserBase should accept ESCAPED_STRICT_RESERVED_WORD as an identifier (Closed)
Patch Set: Address comments and add NULL to statement_data Created 3 years, 10 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 | « no previous file | test/cctest/test-parsing.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/parsing/parser-base.h
diff --git a/src/parsing/parser-base.h b/src/parsing/parser-base.h
index acea162a003c06bbe58299b2bbdb3e079d46ecd0..a54bab65b928cab2b04a5dbcd707819046112839 100644
--- a/src/parsing/parser-base.h
+++ b/src/parsing/parser-base.h
@@ -811,6 +811,7 @@ class ParserBase {
bool is_any_identifier(Token::Value token) {
return token == Token::IDENTIFIER || token == Token::ENUM ||
token == Token::AWAIT || token == Token::ASYNC ||
+ token == Token::ESCAPED_STRICT_RESERVED_WORD ||
token == Token::FUTURE_STRICT_RESERVED_WORD || token == Token::LET ||
token == Token::STATIC || token == Token::YIELD;
}
@@ -1681,7 +1682,8 @@ ParserBase<Impl>::ParseIdentifierOrStrictReservedWord(
!IsAsyncFunction(function_kind)) ||
next == Token::ASYNC) {
*is_strict_reserved = false;
- } else if (next == Token::FUTURE_STRICT_RESERVED_WORD || next == Token::LET ||
+ } else if (next == Token::ESCAPED_STRICT_RESERVED_WORD ||
+ next == Token::FUTURE_STRICT_RESERVED_WORD || next == Token::LET ||
next == Token::STATIC ||
(next == Token::YIELD && !IsGeneratorFunction(function_kind))) {
*is_strict_reserved = true;
« no previous file with comments | « no previous file | test/cctest/test-parsing.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698