Meriyah does not properly follow ECMA standards on function declaration and calling.
See original GitHub issueWhen experimenting with Meriyah, I discovered the parser properly registers the following invalid function declarations and calls:
function 10() {
return 10;
}
10();
function "string"() {
return "string"();
}
"string"();
Meriyah also struggles when calling functions. It will assume that the name of the function being called is an identifier, and not a literal.
Issue Analytics
- State:
- Created 3 years ago
- Comments:16 (15 by maintainers)
Top Results From Across the Web
No results found
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
NVM, my mistake,
[]()
and({}())
is runtime error too 😃Other parsers like acorn and TS do not reject them.