Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: e1fa24db3dc2789962e9100810cd93ff2304ab2a
      
https://github.com/WebKit/WebKit/commit/e1fa24db3dc2789962e9100810cd93ff2304ab2a
  Author: Alexey Shvayka <[email protected]>
  Date:   2023-10-18 (Wed, 18 Oct 2023)

  Changed paths:
    M LayoutTests/js/parser-syntax-check-expected.txt
    M LayoutTests/js/script-tests/parser-syntax-check.js
    M Source/JavaScriptCore/parser/Parser.cpp

  Log Message:
  -----------
  [JSC] Escaped contextual keywords should be allowed as label identifiers
https://bugs.webkit.org/show_bug.cgi?id=263307
<rdar://problem/117118507>

Reviewed by Ross Kirsling.

This change aligns parseExpressionOrLabelStatement() call site in 
parseStatement() with the one in
parseStatementListItem() to be invoked for escaped contextual keywords, 
allowing escaped `let`, `yield`,
and `await` keywords to be used as label identifiers in single-statement 
context as per spec [1].

Aligns JSC with V8 and SpiderMonkey.

[1]: https://tc39.es/ecma262/#prod-LabelIdentifier

* LayoutTests/js/parser-syntax-check-expected.txt:
* LayoutTests/js/script-tests/parser-syntax-check.js:
* Source/JavaScriptCore/parser/Parser.cpp:
(JSC::Parser<LexerType>::parseStatement):

Canonical link: https://commits.webkit.org/269495@main


_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to