mirror of
https://github.com/Reuh/anselme.git
synced 2025-10-27 16:49:31 +00:00
Cache read values in local state, handle mutable variables properly
This commit is contained in:
parent
607313d5ce
commit
0f89307d5f
9 changed files with 258 additions and 7 deletions
13
test/run.lua
13
test/run.lua
|
|
@ -195,6 +195,19 @@ else
|
|||
local t, d = istate:step()
|
||||
table.insert(result, { t, d })
|
||||
until t == "return" or t == "error"
|
||||
|
||||
local postrun = vm:eval(namespace..".post run")
|
||||
if postrun then
|
||||
istate, e = vm:run(namespace.."."..postrun)
|
||||
if not istate then
|
||||
table.insert(result, { "error", e })
|
||||
else
|
||||
repeat
|
||||
local t, d = istate:step()
|
||||
table.insert(result, { t, d })
|
||||
until t == "return" or t == "error"
|
||||
end
|
||||
end
|
||||
end
|
||||
else
|
||||
table.insert(result, { "error", err })
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue