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

Unified Diff: src/parsing/scanner.cc

Issue 1602013007: Fix handling of escaped "let" and "static" tokens (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 11 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
Index: src/parsing/scanner.cc
diff --git a/src/parsing/scanner.cc b/src/parsing/scanner.cc
index 19fab9355e0b105aa666d86ded78dc362e91ee83..79e431f2e1e97c4538a521d0c11665a0ca72348a 100644
--- a/src/parsing/scanner.cc
+++ b/src/parsing/scanner.cc
@@ -1206,7 +1206,9 @@ static Token::Value KeywordOrIdentifierToken(const uint8_t* input,
(keyword_length <= 8 || input[8] == keyword[8]) && \
(keyword_length <= 9 || input[9] == keyword[9])) { \
if (escaped) { \
- return token == Token::FUTURE_STRICT_RESERVED_WORD \
+ /* TODO(adamk): YIELD should be handled specially. */ \
+ return (token == Token::FUTURE_STRICT_RESERVED_WORD || \
+ token == Token::LET || token == Token::STATIC) \
? Token::ESCAPED_STRICT_RESERVED_WORD \
: Token::ESCAPED_KEYWORD; \
} \

Powered by Google App Engine
This is Rietveld 408576698