[parser] Allow escaped future reserved keywords as identifiers
Bug: v8:11688 Change-Id: I35cf5d11d1a9af68be29c8e00224667ddbf07e7a Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2864388 Reviewed-by: Marja Hölttä <marja@chromium.org> Commit-Queue: Shu-yu Guo <syg@chromium.org> Cr-Commit-Position: refs/heads/master@{#74362}
This commit is contained in:
parent
2b69a1f049
commit
68c9af01f5
@ -4427,6 +4427,12 @@ bool ParserBase<Impl>::IsNextLetKeyword() {
|
||||
case Token::ASYNC:
|
||||
return true;
|
||||
case Token::FUTURE_STRICT_RESERVED_WORD:
|
||||
case Token::ESCAPED_STRICT_RESERVED_WORD:
|
||||
// The early error rule for future reserved keywords
|
||||
// (ES#sec-identifiers-static-semantics-early-errors) uses the static
|
||||
// semantics StringValue of IdentifierName, which normalizes escape
|
||||
// sequences. So, both escaped and unescaped future reserved keywords are
|
||||
// allowed as identifiers in sloppy mode.
|
||||
return is_sloppy(language_mode());
|
||||
default:
|
||||
return false;
|
||||
|
@ -588,15 +588,6 @@
|
||||
# https://bugs.chromium.org/p/v8/issues/detail?id=11689
|
||||
'built-ins/BigInt/wrapper-object-ordinary-toprimitive': [FAIL],
|
||||
|
||||
# https://bugs.chromium.org/p/v8/issues/detail?id=11688
|
||||
'language/future-reserved-words/implements': [FAIL],
|
||||
'language/future-reserved-words/interface': [FAIL],
|
||||
'language/future-reserved-words/private': [FAIL],
|
||||
'language/future-reserved-words/protected': [FAIL],
|
||||
'language/future-reserved-words/public': [FAIL],
|
||||
'language/future-reserved-words/package': [FAIL],
|
||||
'language/future-reserved-words/static': [FAIL],
|
||||
|
||||
# https://bugs.chromium.org/p/v8/issues/detail?id=11690
|
||||
'language/module-code/export-expname-binding-index': [FAIL],
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user