26 lines
490 B
Plaintext
26 lines
490 B
Plaintext
switch .x, .y, .z {
|
|
case true: ...
|
|
# any are true
|
|
case false, _: ...
|
|
# .x == false
|
|
case _, null, true: ...
|
|
# .y == null or .z == true
|
|
case xor _, true, true: ...
|
|
# .y == true xor .z == true
|
|
}
|
|
|
|
switch 0 {
|
|
case .x, .y: ...
|
|
# .x or .y equals 0
|
|
...
|
|
}
|
|
|
|
switch[and] .x, .y, .z {
|
|
case true: ...
|
|
# all are true
|
|
case false, _: ...
|
|
# .x == false
|
|
case _, null, true: ...
|
|
# .y == null and .z == true
|
|
}
|