mirror of
https://github.com/Reuh/anselme.git
synced 2025-10-27 16:49:31 +00:00
Decorator system simplification, removed paragraph decorators, added function decorators
This commit is contained in:
parent
6f564ea0e2
commit
0171d92352
16 changed files with 265 additions and 290 deletions
|
|
@ -195,6 +195,7 @@ else
|
|||
if args["write-new"] and e:match("No such file") then
|
||||
write_result(filebase, result)
|
||||
print("Written result file for "..filebase)
|
||||
success = success + 1
|
||||
elseif not args.silent then
|
||||
print("> "..namespace)
|
||||
print(e)
|
||||
|
|
|
|||
3
test/tests/function decorator scope explicit call.ans
Normal file
3
test/tests/function decorator scope explicit call.ans
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
a.👁️: {a.👁️} $ a
|
||||
|
||||
~ a()
|
||||
9
test/tests/function decorator scope implicit call.ans
Normal file
9
test/tests/function decorator scope implicit call.ans
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
$ f
|
||||
ko
|
||||
a.👁️: {a.👁️} $ a
|
||||
ok
|
||||
|
||||
~ f.a
|
||||
|
||||
In function:
|
||||
~ f
|
||||
37
test/tests/function decorator scope implicit call.lua
Normal file
37
test/tests/function decorator scope implicit call.lua
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
local _={}
|
||||
_[15]={}
|
||||
_[14]={}
|
||||
_[13]={}
|
||||
_[12]={}
|
||||
_[11]={}
|
||||
_[10]={data="ok",tags=_[15]}
|
||||
_[9]={data="a.\240\159\145\129\239\184\143: 1",tags=_[14]}
|
||||
_[8]={data="ko",tags=_[13]}
|
||||
_[7]={data="In function:",tags=_[12]}
|
||||
_[6]={data="a.\240\159\145\129\239\184\143: 0",tags=_[11]}
|
||||
_[5]={_[7],_[8],_[9],_[10]}
|
||||
_[4]={_[6]}
|
||||
_[3]={"return"}
|
||||
_[2]={"text",_[5]}
|
||||
_[1]={"text",_[4]}
|
||||
return {_[1],_[2],_[3]}
|
||||
--[[
|
||||
{ "text", { {
|
||||
data = "a.👁️: 0",
|
||||
tags = {}
|
||||
} } }
|
||||
{ "text", { {
|
||||
data = "In function:",
|
||||
tags = {}
|
||||
}, {
|
||||
data = "ko",
|
||||
tags = {}
|
||||
}, {
|
||||
data = "a.👁️: 1",
|
||||
tags = {}
|
||||
}, {
|
||||
data = "ok",
|
||||
tags = {}
|
||||
} } }
|
||||
{ "return" }
|
||||
]]--
|
||||
1
test/tests/function decorator scope.ans
Normal file
1
test/tests/function decorator scope.ans
Normal file
|
|
@ -0,0 +1 @@
|
|||
a.👁️: {a.👁️} $ a
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
local _={}
|
||||
_[5]={}
|
||||
_[4]={data="a.\240\159\145\129\239\184\143: 0",tags=_[5]}
|
||||
_[4]={tags=_[5],data="a.\240\159\145\129\239\184\143: 0"}
|
||||
_[3]={_[4]}
|
||||
_[2]={"return"}
|
||||
_[1]={"text",_[3]}
|
||||
|
|
@ -1,3 +0,0 @@
|
|||
a.👁️: {a.👁️} § a
|
||||
|
||||
~ a()
|
||||
|
|
@ -1,6 +0,0 @@
|
|||
$ f
|
||||
ko
|
||||
a.👁️: {a.👁️} § a
|
||||
ok
|
||||
|
||||
~ f.a
|
||||
|
|
@ -1,19 +0,0 @@
|
|||
local _={}
|
||||
_[7]={}
|
||||
_[6]={}
|
||||
_[5]={data="ok",tags=_[7]}
|
||||
_[4]={data="a.\240\159\145\129\239\184\143: 0",tags=_[6]}
|
||||
_[3]={_[4],_[5]}
|
||||
_[2]={"return"}
|
||||
_[1]={"text",_[3]}
|
||||
return {_[1],_[2]}
|
||||
--[[
|
||||
{ "text", { {
|
||||
data = "a.👁️: 0",
|
||||
tags = {}
|
||||
}, {
|
||||
data = "ok",
|
||||
tags = {}
|
||||
} } }
|
||||
{ "return" }
|
||||
]]--
|
||||
|
|
@ -1 +0,0 @@
|
|||
a.👁️: {a.👁️} § a
|
||||
Loading…
Add table
Add a link
Reference in a new issue