mirror of
https://github.com/MorizzG/MLox.git
synced 2025-12-06 12:32:41 +00:00
6 lines
257 B
Lox
6 lines
257 B
Lox
|
|
// Evaluate the 'else' expression if the condition is false.
|
||
|
|
if (true) print "good"; else print "bad"; // expect: good
|
||
|
|
if (false) print "bad"; else print "good"; // expect: good
|
||
|
|
|
||
|
|
// Allow block body.
|
||
|
|
if (false) nil; else { print "block"; } // expect: block
|