1
0
Fork 0
mirror of https://github.com/Reuh/anselme.git synced 2025-10-27 16:49:31 +00:00

Parser only change state on success

This commit is contained in:
Étienne Fildadut 2021-06-05 21:34:12 +02:00
parent 0e755ea841
commit c847fefd39
3 changed files with 59 additions and 16 deletions

View file

@ -8,6 +8,7 @@ common = {
local global_vars = state.interpreter.global_state.variables
for var, value in pairs(state.variables) do
global_vars[var] = value
state.variables[var] = nil
end
end,
-- returns a variable's value, evaluating a pending expression if neccessary