mirror of
https://github.com/Reuh/anselme.git
synced 2025-10-27 16:49:31 +00:00
Allow argument-less calling using ! suffix
This commit is contained in:
parent
6e5cbf9e7e
commit
d5b1a9f225
6 changed files with 94 additions and 30 deletions
12
test/tests/function reference call explicit call.ans
Normal file
12
test/tests/function reference call explicit call.ans
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
$ fn
|
||||
1
|
||||
§ c
|
||||
2
|
||||
|
||||
:c = &fn
|
||||
|
||||
~ c!
|
||||
|
||||
~ c()
|
||||
|
||||
~ c!
|
||||
40
test/tests/function reference call explicit call.lua
Normal file
40
test/tests/function reference call explicit call.lua
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
local _={}
|
||||
_[17]={}
|
||||
_[16]={}
|
||||
_[15]={}
|
||||
_[14]={}
|
||||
_[13]={}
|
||||
_[12]={text="2",tags=_[17]}
|
||||
_[11]={text="2",tags=_[16]}
|
||||
_[10]={text="1",tags=_[15]}
|
||||
_[9]={text="2",tags=_[14]}
|
||||
_[8]={text="1",tags=_[13]}
|
||||
_[7]={_[12]}
|
||||
_[6]={_[10],_[11]}
|
||||
_[5]={_[8],_[9]}
|
||||
_[4]={"return"}
|
||||
_[3]={"text",_[7]}
|
||||
_[2]={"text",_[6]}
|
||||
_[1]={"text",_[5]}
|
||||
return {_[1],_[2],_[3],_[4]}
|
||||
--[[
|
||||
{ "text", { {
|
||||
tags = {},
|
||||
text = "1"
|
||||
}, {
|
||||
tags = {},
|
||||
text = "2"
|
||||
} } }
|
||||
{ "text", { {
|
||||
tags = {},
|
||||
text = "1"
|
||||
}, {
|
||||
tags = {},
|
||||
text = "2"
|
||||
} } }
|
||||
{ "text", { {
|
||||
tags = {},
|
||||
text = "2"
|
||||
} } }
|
||||
{ "return" }
|
||||
]]--
|
||||
|
|
@ -17,24 +17,24 @@ _[41]={}
|
|||
_[40]={}
|
||||
_[39]={}
|
||||
_[38]={}
|
||||
_[37]={text="8",tags=_[55]}
|
||||
_[36]={text="8: ",tags=_[54]}
|
||||
_[35]={text="7",tags=_[53]}
|
||||
_[34]={text="7: ",tags=_[52]}
|
||||
_[33]={text="13",tags=_[51]}
|
||||
_[32]={text="13: ",tags=_[50]}
|
||||
_[31]={text="5",tags=_[49]}
|
||||
_[30]={text="5: ",tags=_[48]}
|
||||
_[29]={text="4",tags=_[47]}
|
||||
_[28]={text="4: ",tags=_[46]}
|
||||
_[27]={text="4",tags=_[45]}
|
||||
_[26]={text="4: ",tags=_[44]}
|
||||
_[25]={text="5",tags=_[43]}
|
||||
_[24]={text="5: ",tags=_[42]}
|
||||
_[23]={text="3",tags=_[41]}
|
||||
_[22]={text="3: ",tags=_[40]}
|
||||
_[21]={text="3",tags=_[39]}
|
||||
_[20]={text="3: ",tags=_[38]}
|
||||
_[37]={tags=_[55],text="8"}
|
||||
_[36]={tags=_[54],text="8: "}
|
||||
_[35]={tags=_[53],text="7"}
|
||||
_[34]={tags=_[52],text="7: "}
|
||||
_[33]={tags=_[51],text="13"}
|
||||
_[32]={tags=_[50],text="13: "}
|
||||
_[31]={tags=_[49],text="5"}
|
||||
_[30]={tags=_[48],text="5: "}
|
||||
_[29]={tags=_[47],text="4"}
|
||||
_[28]={tags=_[46],text="4: "}
|
||||
_[27]={tags=_[45],text="4"}
|
||||
_[26]={tags=_[44],text="4: "}
|
||||
_[25]={tags=_[43],text="5"}
|
||||
_[24]={tags=_[42],text="5: "}
|
||||
_[23]={tags=_[41],text="3"}
|
||||
_[22]={tags=_[40],text="3: "}
|
||||
_[21]={tags=_[39],text="3"}
|
||||
_[20]={tags=_[38],text="3: "}
|
||||
_[19]={_[36],_[37]}
|
||||
_[18]={_[34],_[35]}
|
||||
_[17]={_[32],_[33]}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue