if-else does not work properly (regression)
Created by: skylerberg
Running this script:
if a == a
echo true a == a
if b != b
echo true b != b
else
echo false b != b
if 3 > 2
echo true 3 > 2
else
echo false 3 > 2
end
end
else
echo false a == a
end
Results in:
true a == a
false b != b
No comparison operator
Syntax error: else found with no previous if
false a == a
Syntax error: end found outside of a block
This is really wrong.
I think this answer is to move this into the grammar, but it is not going to be easy: https://github.com/redox-os/ion/issues/119. Also, https://github.com/redox-os/ion/issues/66 could have prevented this regression.