forked from x/ContextOS
opt yac
This commit is contained in:
parent
b28acce3bc
commit
2513a37b7e
24
src/demo.shy
24
src/demo.shy
@ -1,20 +1,24 @@
|
|||||||
# demo script
|
# demo script
|
||||||
|
|
||||||
for i = 1; i < 10; i++ { pwd }
|
let a = system(ls bin)
|
||||||
return
|
return
|
||||||
let a = 1+2*3+1-0
|
|
||||||
|
|
||||||
func show {
|
let a = 1
|
||||||
if a > 2 {
|
if a > 0 { pwd }
|
||||||
|
if a = 2; a > 0 { pwd }
|
||||||
|
for a = 2; a < 5; a++ { pwd }
|
||||||
|
for a = 2; a < 5 {
|
||||||
pwd
|
pwd
|
||||||
|
let a = a + 1
|
||||||
}
|
}
|
||||||
if a > 2 { pwd }
|
let a = 2
|
||||||
return
|
for a < 5 {
|
||||||
pwd
|
pwd
|
||||||
|
let a = a + 1
|
||||||
}
|
}
|
||||||
show
|
let a = 2
|
||||||
|
for ;a < 5; {
|
||||||
pwd
|
pwd
|
||||||
|
let a = a + 1
|
||||||
|
}
|
||||||
|
|
||||||
show
|
|
||||||
return
|
|
||||||
pwd
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user