Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
|
|
@ -0,0 +1,9 @@
|
|||
if .x == 0 {
|
||||
...
|
||||
} else if .x > 0 {
|
||||
val .y = 100
|
||||
...
|
||||
} else {
|
||||
val .y = 70
|
||||
...
|
||||
}
|
||||
|
|
@ -0,0 +1 @@
|
|||
if(.x > .y: ...; .x < .y: ...; /* else */ ...)
|
||||
|
|
@ -0,0 +1 @@
|
|||
if .x > .y: break
|
||||
|
|
@ -0,0 +1,25 @@
|
|||
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
|
||||
...
|
||||
}
|
||||
|
||||
given .x, .y, .z {
|
||||
case true: ...
|
||||
# all are true
|
||||
case false, _: ...
|
||||
# .x == false
|
||||
case _, null, true: ...
|
||||
# .y == null and .z == true
|
||||
}
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
given .x {
|
||||
case true:
|
||||
# implicit fallthrough
|
||||
case null: 0
|
||||
# no fallthrough
|
||||
default: 1
|
||||
}
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
given .x {
|
||||
case true:
|
||||
if .y > 100 {
|
||||
fallthrough
|
||||
} else {
|
||||
120
|
||||
}
|
||||
case false: ...
|
||||
}
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
given(.x, .y, .z;
|
||||
true: ... ; # all are equal to true
|
||||
_, >= .z: ...; # .y >= .z
|
||||
... ) # default
|
||||
Loading…
Add table
Add a link
Reference in a new issue