mirror of
https://github.com/ProgramSnail/Lama.git
synced 2025-12-05 22:38:44 +00:00
Sync
This commit is contained in:
parent
8758485b80
commit
f8a5e2067a
3 changed files with 10 additions and 3 deletions
|
|
@ -1,4 +1,4 @@
|
|||
TESTS=test001 test002 test003 test004 test005 test006 test007 test008 test009 test010 test011
|
||||
TESTS=test001 test002 test003 test004 test005 test006 test007 test008 test009 test010 test011 test012
|
||||
|
||||
RC=../src/rc.opt
|
||||
|
||||
|
|
|
|||
|
|
@ -1 +1,8 @@
|
|||
36
|
||||
> 0
|
||||
0
|
||||
0
|
||||
1
|
||||
1
|
||||
0
|
||||
1
|
||||
1
|
||||
|
|
|
|||
|
|
@ -86,7 +86,7 @@ let compile p =
|
|||
| Stmt.If (c, s1, s2) -> let l2, env = env#get_label in
|
||||
let env, flag1, s1 = compile' l env s1 in
|
||||
let env, flag2, s2 = compile' l env s2 in
|
||||
env, true, expr c @ [CJMP ("z", l2)] @ s1 @ (if flag1 then [] else [JMP l]) @ [LABEL l2] @ s2 @ (if flag2 then [] else [JMP l])
|
||||
env, true, expr c @ [CJMP ("z", l2)] @ s1 @ (if flag1 then [] else [JMP l]) @ [LABEL l2] @ s2 @ (if flag2 then [] else [JMP l])
|
||||
|
||||
| Stmt.While (c, s) -> let loop, env = env#get_label in
|
||||
let cond, env = env#get_label in
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue