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

Unified Diff: src/parsing/token.h

Issue 2267493002: Disallow 'await' in object literal shorthand position (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: More cleanup Created 4 years, 4 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/token.h
diff --git a/src/parsing/token.h b/src/parsing/token.h
index 3c446641c4bd1a404dc7ade4ae0eed12266e8a40..64cc337afcc4b0776bd1be2b6f5abee9ce43e50c 100644
--- a/src/parsing/token.h
+++ b/src/parsing/token.h
@@ -200,7 +200,7 @@ class Token {
}
static bool IsIdentifier(Value tok, LanguageMode language_mode,
- bool is_generator, bool is_module) {
+ bool is_generator, bool disallow_await) {
switch (tok) {
case IDENTIFIER:
case ASYNC:
@@ -213,7 +213,7 @@ class Token {
case YIELD:
return !is_generator && is_sloppy(language_mode);
case AWAIT:
- return !is_module;
+ return !disallow_await;
default:
return false;
}

Powered by Google App Engine
This is Rietveld 408576698