New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Per ECMAScript spec, function
body {...}
is not a block
#2067
Comments
@zhanzhenzhen can you add some code to show your scenario? |
function a() {} {
"type": "Program",
"body": [
{
"type": "FunctionDeclaration",
"id": {
"type": "Identifier",
"name": "a"
},
"params": [],
"body": {
"type": "BlockStatement",
"body": []
},
"generator": false,
"expression": false,
"async": false
}
],
"sourceType": "script"
} But the ECMAScript specification says
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
ECMAScript 2021:
https://tc39.es/ecma262/#sec-function-definitions
ECMAScript 5.1:
https://262.ecma-international.org/5.1/#sec-13
The text was updated successfully, but these errors were encountered: