mirror of
https://github.com/ProgramSnail/Lama.git
synced 2025-12-25 16:18:48 +00:00
Fixed bug in sexp arity
This commit is contained in:
parent
dc38319a13
commit
99fdd176f4
6 changed files with 42 additions and 31 deletions
|
|
@ -322,10 +322,11 @@ let compile env code =
|
|||
let x, y = env#peek2 in
|
||||
env, [Push x; Push y; Pop x; Pop y]
|
||||
|
||||
| TAG t ->
|
||||
let s, env = env#allocate in
|
||||
let env, code = call env ".tag" 2 false in
|
||||
env, [Mov (L env#hash t, s)] @ code
|
||||
| TAG (t, n) ->
|
||||
let s1, env = env#allocate in
|
||||
let s2, env = env#allocate in
|
||||
let env, code = call env ".tag" 3 false in
|
||||
env, [Mov (L env#hash t, s1); Mov (L n, s2)] @ code
|
||||
|
||||
| ENTER xs ->
|
||||
let env, code =
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue