fix parser

This commit is contained in:
Tan, Kian-ting 2025-09-09 02:35:08 +08:00
parent 1d851522ba
commit 0ff09027a2

View file

@ -470,9 +470,9 @@ end
subExp = Psr(subExpAux) subExp = Psr(subExpAux)
function longExpAux(input) function longExpAux(input)
rawFunc = seq([typ("if"), subExp, rawFunc = seq([typ("if"), exp,
typ("then"), subExp, typ("then"), body,
typ("else"), subExp]) typ("else"), body])
rawRes = rawFunc.fun(input) rawRes = rawFunc.fun(input)
if rawRes != nothing if rawRes != nothing
cond = rawRes.matched[2] cond = rawRes.matched[2]