1
0
Fork 0
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:
Étienne Fildadut 2021-12-02 21:07:47 +01:00
parent 607313d5ce
commit 0f89307d5f
9 changed files with 258 additions and 7 deletions

View file

@ -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 })