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