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

Add "function return" and "scoped function return" injections, allow children for return lines

This commit is contained in:
Étienne Fildadut 2022-01-16 15:32:59 +01:00
parent b60f53df01
commit 933e8fb0ee
7 changed files with 131 additions and 72 deletions

View file

@ -0,0 +1,13 @@
$ fn
:i=0
@i
~ i:=5
{i}
{fn} = 50
$ g
@0
@3
{g} = 3

View file

@ -0,0 +1,37 @@
local _={}
_[15]={}
_[14]={}
_[13]={}
_[12]={}
_[11]={}
_[10]={text=" = 3",tags=_[15]}
_[9]={text="3",tags=_[14]}
_[8]={text=" = 50",tags=_[13]}
_[7]={text="0",tags=_[12]}
_[6]={text="5",tags=_[11]}
_[5]={_[9],_[10]}
_[4]={_[6],_[7],_[8]}
_[3]={"return"}
_[2]={"text",_[5]}
_[1]={"text",_[4]}
return {_[1],_[2],_[3]}
--[[
{ "text", { {
tags = {},
text = "5"
}, {
tags = {},
text = "0"
}, {
tags = {},
text = " = 50"
} } }
{ "text", { {
tags = {},
text = "3"
}, {
tags = {},
text = " = 3"
} } }
{ "return" }
]]--