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

Switch back to tag:pop instead of tag:trim

The tag operator should allow for all the user-defined tagging you need, and it already ensures the stack stays consistent so there's no need to be extra careful with tag:trim.
This commit is contained in:
Étienne Fildadut 2021-11-28 16:31:42 +01:00
parent 38b2a6ae69
commit 90e5a2d9cf
3 changed files with 8 additions and 11 deletions

View file

@ -138,9 +138,9 @@ local function eval(state, exp)
elseif exp.type == "#" then
local right, righte = eval(state, exp.right)
if not right then return right, righte end
local i = tags:push(state, right)
tags:push(state, right)
local left, lefte = eval(state, exp.left)
tags:trim(state, i-1)
tags:pop(state)
if not left then return left, lefte end
return left
-- variable