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

First test batch and associated fixes

The test runner is also nicer to use.
This commit is contained in:
Étienne Fildadut 2023-12-28 16:51:18 +01:00
parent 10084dec23
commit 82ce53be83
154 changed files with 1586 additions and 78 deletions

View file

@ -21,9 +21,8 @@ return {
"_~_", "(condition, expression)", function(state, condition, expression)
ensure_if_variable(state)
if condition:truthy() then
local r = expression:call(state, ArgumentTuple:new())
set_if_variable(state, true)
return r
return expression:call(state, ArgumentTuple:new())
else
set_if_variable(state, false)
return Nil:new()
@ -37,9 +36,8 @@ return {
if last_if_success(state) then
return Nil:new()
else
local r = expression:call(state, ArgumentTuple:new())
set_if_variable(state, true)
return r
return expression:call(state, ArgumentTuple:new())
end
end
},