summaryrefslogtreecommitdiff
path: root/quickjs.c
diff options
context:
space:
mode:
authorFabrice Bellard <fabrice@bellard.org>2025-05-24 12:47:35 +0200
committerFabrice Bellard <fabrice@bellard.org>2025-05-24 12:47:35 +0200
commit02a2643142a0522e9e2d0d60df19e72daa84bbc3 (patch)
treeda34ca5a76b8933b08d31be0b9d77b4c4ad3c95a /quickjs.c
parent3dc7ef1f7f500e39698bef9762b904b2690bb369 (diff)
downloadquickjs-02a2643142a0522e9e2d0d60df19e72daa84bbc3.tar.gz
quickjs-02a2643142a0522e9e2d0d60df19e72daa84bbc3.zip
fixed parsing of function definition
Diffstat (limited to 'quickjs.c')
-rw-r--r--quickjs.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/quickjs.c b/quickjs.c
index b9c0152..ac4f2aa 100644
--- a/quickjs.c
+++ b/quickjs.c
@@ -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;