-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[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
- Loading branch information
Alexey Shvayka
committed
Nov 8, 2023
1 parent
f1403b1
commit 17d1d74
Showing
3 changed files
with
5 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters