mirror of
https://github.com/bellard/quickjs.git
synced 2025-09-30 06:54:26 +03:00
fixed parsing of function definition
This commit is contained in:
@@ -35353,7 +35353,7 @@ static __exception int js_parse_function_decl2(JSParseState *s,
|
||||
push_scope(s); /* enter body scope */
|
||||
fd->body_scope = fd->scope_level;
|
||||
|
||||
if (s->token.val == TOK_ARROW) {
|
||||
if (s->token.val == TOK_ARROW && func_type == JS_PARSE_FUNC_ARROW) {
|
||||
if (next_token(s))
|
||||
goto fail;
|
||||
|
||||
|
Reference in New Issue
Block a user