repo.or.cz
/
voodoo-lang.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
New Environment class. Tests pass on AMD64
[voodoo-lang.git]
/
test
/
block.voo
blob
dd07416d0f514a42c75c5a8a74b7dd910cea6d03
1
#### Test case for blocks
2
3
section data
4
5
format:
6
string "%d\n\x00"
7
8
section functions
9
import printf
10
export main
11
12
main:
13
function argc argv
14
block
15
let x 12
16
call printf format x
17
18
block
19
let x 42
20
call printf format x
21
end block
22
23
call printf format x
24
25
block
26
let y 67
27
call printf format x
28
call printf format y
29
end block
30
31
call printf format x
32
end block
33
34
return 0
35
end function