mirror of
https://github.com/Reuh/candran.git
synced 2025-10-27 17:59:30 +00:00
0.5.0
Fixed plenty of bugs. Tests are lacking.
This commit is contained in:
parent
6b95bfb698
commit
d249c353c5
7 changed files with 315 additions and 95 deletions
|
|
@ -171,7 +171,7 @@ end
|
|||
local function traverse_assignment (env, stm)
|
||||
local status, msg = traverse_varlist(env, stm[1])
|
||||
if not status then return status, msg end
|
||||
status, msg = traverse_explist(env, stm[2])
|
||||
status, msg = traverse_explist(env, stm[#stm])
|
||||
if not status then return status, msg end
|
||||
return true
|
||||
end
|
||||
|
|
@ -372,7 +372,7 @@ function traverse_stm (env, stm)
|
|||
local tag = stm.tag
|
||||
if tag == "Do" then -- `Do{ stat* }
|
||||
return traverse_block(env, stm)
|
||||
elseif tag == "Set" then -- `Set{ {lhs+} {expr+} }
|
||||
elseif tag == "Set" then -- `Set{ {lhs+} (opid? = opid?)? {expr+} }
|
||||
return traverse_assignment(env, stm)
|
||||
elseif tag == "While" then -- `While{ expr block }
|
||||
return traverse_while(env, stm)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue