erg/crates/erg_parser/tests/simple_if.er
Shunsuke Shibayama ce6a6dbecd fix: typo
2023-06-09 22:23:25 +09:00

28 lines
393 B
Python

result = if Bool.sample!():
do 0
do 1
print! result
if True, () -> log "hello"
if! False, () => print! "hello"
if! True:
() => print! "hello"
() => print! "world"
print! if False:
() -> "a"
() -> "b"
print!(if(True, () -> "a", () -> "b"))
if! True:
do! print! "hello"
do! print! "world"
if! False:
do!:
print! "a"
do!:
print! "b"