fix parse error with stateNum numbering: should only increment stateNum in computeAtom function, and never anywhere else

This commit is contained in:
2025-10-01 14:19:27 +01:00
parent b3f56dfaff
commit b9c20c43aa

View File

@@ -113,7 +113,7 @@ struct
else
case computeAtom (pos, str, stateNum) of
SOME (nextPos, curAtom, stateNum) =>
(case climb (nextPos, str, curAtom, concatLevel, stateNum + 1) of
(case climb (nextPos, str, curAtom, concatLevel, stateNum) of
SOME (pos, rhs, stateNum) =>
let val result = CONCAT (lhs, rhs)
in SOME (pos, result, stateNum)