Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 17d1d747ad3bb45ca5d2f0c735778816a3cd701f
      
https://github.com/WebKit/WebKit/commit/17d1d747ad3bb45ca5d2f0c735778816a3cd701f
  Author: Alexey Shvayka <[email protected]>
  Date:   2023-11-08 (Wed, 08 Nov 2023)

  Changed paths:
    M JSTests/stress/generator-class-methods-syntax.js
    M JSTests/stress/regress-189292.js
    M Source/JavaScriptCore/parser/Parser.cpp

  Log Message:
  -----------
  [JSC] Refine SyntaxError message for generator method parsing failure
https://bugs.webkit.org/show_bug.cgi?id=264368
<rdar://problem/118081884>

Reviewed by Justin Michaud.

This change rewords SyntaxError message, thrown in case of generator method 
parsing failure,
to mention "method" rather than "function", aligning error wording for sync 
generator functions
with async counterparts.

Also, tweaks the helper to return "generator function" instead of "generator" 
for GeneratorBodyMode,
which is unobservable yet matches the terminology of the spec [1].

[1]: https://tc39.es/ecma262/#sec-generator-objects

* JSTests/stress/generator-class-methods-syntax.js:
* JSTests/stress/regress-189292.js:
* Source/JavaScriptCore/parser/Parser.cpp:
(JSC::stringForFunctionMode):

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


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

Reply via email to