If-then-else is working with jump statements

This commit is contained in:
2022-08-20 12:38:29 +01:00
parent cbdfcbcc14
commit 975ed41d14
8 changed files with 223 additions and 2 deletions

21
test/jumps.toy Normal file
View File

@@ -0,0 +1,21 @@
//test true jump
if (true) {
assert true, "if-then failed";
}
else {
assert false, "if-then failed";
}
//test false jump
if (false) {
assert false, "if-then failed";
}
else {
assert true, "if-then failed";
}
print "All good";