diff options
author | Fabrice Bellard <fabrice@bellard.org> | 2025-05-24 12:47:35 +0200 |
---|---|---|
committer | Fabrice Bellard <fabrice@bellard.org> | 2025-05-24 12:47:35 +0200 |
commit | 02a2643142a0522e9e2d0d60df19e72daa84bbc3 (patch) | |
tree | da34ca5a76b8933b08d31be0b9d77b4c4ad3c95a /quickjs.c | |
parent | 3dc7ef1f7f500e39698bef9762b904b2690bb369 (diff) | |
download | quickjs-02a2643142a0522e9e2d0d60df19e72daa84bbc3.tar.gz quickjs-02a2643142a0522e9e2d0d60df19e72daa84bbc3.zip |
fixed parsing of function definition
Diffstat (limited to 'quickjs.c')
-rw-r--r-- | quickjs.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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; |