mirror of
https://github.com/Reuh/anselme.git
synced 2025-10-28 00:59:31 +00:00
Add nil expression and fix return behavior with nil expression
This commit is contained in:
parent
6488bef75c
commit
b9c6d1d704
10 changed files with 84 additions and 21 deletions
9
test/tests/function return exit function nested.ans
Normal file
9
test/tests/function return exit function nested.ans
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
$ hey
|
||||
§ foo
|
||||
@2
|
||||
@3
|
||||
@5
|
||||
u
|
||||
|
||||
{hey}
|
||||
{hey.foo}
|
||||
19
test/tests/function return exit function nested.lua
Normal file
19
test/tests/function return exit function nested.lua
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
local _={}
|
||||
_[7]={}
|
||||
_[6]={}
|
||||
_[5]={data="2",tags=_[7]}
|
||||
_[4]={data="5",tags=_[6]}
|
||||
_[3]={_[4],_[5]}
|
||||
_[2]={"return"}
|
||||
_[1]={"text",_[3]}
|
||||
return {_[1],_[2]}
|
||||
--[[
|
||||
{ "text", { {
|
||||
data = "5",
|
||||
tags = {}
|
||||
}, {
|
||||
data = "2",
|
||||
tags = {}
|
||||
} } }
|
||||
{ "return" }
|
||||
]]--
|
||||
6
test/tests/function return exit function.ans
Normal file
6
test/tests/function return exit function.ans
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
$ hey
|
||||
@5
|
||||
a
|
||||
@2
|
||||
|
||||
{hey}
|
||||
14
test/tests/function return exit function.lua
Normal file
14
test/tests/function return exit function.lua
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
local _={}
|
||||
_[5]={}
|
||||
_[4]={data="5",tags=_[5]}
|
||||
_[3]={_[4]}
|
||||
_[2]={"return"}
|
||||
_[1]={"text",_[3]}
|
||||
return {_[1],_[2]}
|
||||
--[[
|
||||
{ "text", { {
|
||||
data = "5",
|
||||
tags = {}
|
||||
} } }
|
||||
{ "return" }
|
||||
]]--
|
||||
Loading…
Add table
Add a link
Reference in a new issue