[webkit-changes] [WebKit/WebKit] 17d1d7: [JSC] Refine SyntaxError message for generator met...
Commit Queue
noreply at github.com
Wed Nov 8 01:00:19 PST 2023
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 17d1d747ad3bb45ca5d2f0c735778816a3cd701f
https://github.com/WebKit/WebKit/commit/17d1d747ad3bb45ca5d2f0c735778816a3cd701f
Author: Alexey Shvayka <ashvayka at apple.com>
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
More information about the webkit-changes
mailing list