about summary refs log tree commit diff
path: root/boot/tests/parse/conditionals.cskt
blob: bf314fa9cb5e8ca1534d9887a966dbbe10497160 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
<<<

if x == 5 {
  return 1
} else if x == 4 {
  return 2
} else {
    return 0
}

>>>

(conditional (when (expr (binary == (expr (name x)) (expr 5)))) (block
	(return (expr 1))
) (when (expr (binary == (expr (name x)) (expr 4)))) (block
	(return (expr 2))
) (always) (block
	(return (expr 0))
))