From 0ff09027a2aeae8f3396b76074c355bafd0759b6 Mon Sep 17 00:00:00 2001 From: Tan Kian-ting Date: Tue, 9 Sep 2025 02:35:08 +0800 Subject: [PATCH] fix parser --- src/parser.jl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/parser.jl b/src/parser.jl index 344c374..8bc2b28 100644 --- a/src/parser.jl +++ b/src/parser.jl @@ -470,9 +470,9 @@ end subExp = Psr(subExpAux) function longExpAux(input) - rawFunc = seq([typ("if"), subExp, - typ("then"), subExp, - typ("else"), subExp]) + rawFunc = seq([typ("if"), exp, + typ("then"), body, + typ("else"), body]) rawRes = rawFunc.fun(input) if rawRes != nothing cond = rawRes.matched[2]