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

  Changed paths:
    M JSTests/test262/expectations.yaml
    M LayoutTests/js/parser-syntax-check-expected.txt
    M LayoutTests/js/script-tests/parser-syntax-check.js
    M Source/JavaScriptCore/parser/Parser.cpp
    M Source/JavaScriptCore/parser/ParserModes.h

  Log Message:
  -----------
  [JSC] `yield` is not a valid BindingIdentifier for AsyncGeneratorExpression
https://bugs.webkit.org/show_bug.cgi?id=263686
<rdar://problem/117497786>

Reviewed by Justin Michaud.

Representation of AsyncGeneratorExpression [1] contains BindingIdentifier 
production with [Yield]
parameter, which throws an early error if it matches `yield` terminal [2].

This change implements above-mentioned error, with an error message similar to 
the case of `await`
idenfitier, aligning JSC with V8 and SpiderMonkey.

[1]: https://tc39.es/ecma262/#prod-AsyncGeneratorExpression
[2]: https://tc39.es/ecma262/#sec-identifiers-static-semantics-early-errors

* LayoutTests/js/parser-syntax-check-expected.txt:
* LayoutTests/js/script-tests/parser-syntax-check.js:
* JSTests/test262/expectations.yaml: Mark 1 test as passing.
* Source/JavaScriptCore/parser/Parser.cpp:
(JSC::Parser<LexerType>::parseFunctionInfo):
* Source/JavaScriptCore/parser/ParserModes.h:
(JSC::isGeneratorOrAsyncGeneratorWrapperParseMode): Extract a helper that will 
most likely be needed elsewhere.

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


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

Reply via email to