Do not evaluate an untaken ELIF's condition

Fixes #764
This commit is contained in:
Rangi
2021-03-22 00:25:22 -04:00
committed by Eldred Habert
parent 46d6652df1
commit aa99ed056c
6 changed files with 38 additions and 2 deletions

View File

@@ -3,7 +3,7 @@ mac: MACRO
println "small \1"
elif (\1) > 100
println "large \1"
elif (\1) / 0 == 42 ; only evaluated if the "large" condition was taken
elif (\1) / 0 == 42 ; only evaluated if neither "small" nor "large" was taken
println "division by zero!?"
elif syntax! error?
println "X_X"
@@ -15,3 +15,4 @@ ENDM
mac 2 + 2
mac STRLEN("abcdef")
mac 101
mac 23