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

Improve function decorator parsing

This commit is contained in:
Étienne Fildadut 2021-11-28 16:23:44 +01:00
parent f2e74c94c9
commit 38b2a6ae69
7 changed files with 57 additions and 104 deletions

View file

@ -5,3 +5,5 @@ quote \"
other codes \n \\ \t
decorators \# tag \~ condition \$ fn
sub \[text]

View file

@ -1,22 +1,26 @@
local _={}
_[21]={}
_[20]={}
_[19]={}
_[18]={}
_[17]={}
_[16]={}
_[15]={}
_[14]={}
_[13]={tags=_[17],text="decorators # tag ~ condition $ fn"}
_[12]={tags=_[16],text="other codes \n \\ \9"}
_[11]={tags=_[15],text="quote \""}
_[10]={tags=_[14],text="expression {a}"}
_[9]={_[13]}
_[8]={_[12]}
_[7]={_[11]}
_[6]={_[10]}
_[5]={"return"}
_[4]={"text",_[9]}
_[3]={"text",_[8]}
_[2]={"text",_[7]}
_[1]={"text",_[6]}
return {_[1],_[2],_[3],_[4],_[5]}
_[16]={text="sub [text]",tags=_[21]}
_[15]={text="decorators # tag ~ condition $ fn",tags=_[20]}
_[14]={text="other codes \n \\ \9",tags=_[19]}
_[13]={text="quote \"",tags=_[18]}
_[12]={text="expression {a}",tags=_[17]}
_[11]={_[16]}
_[10]={_[15]}
_[9]={_[14]}
_[8]={_[13]}
_[7]={_[12]}
_[6]={"return"}
_[5]={"text",_[11]}
_[4]={"text",_[10]}
_[3]={"text",_[9]}
_[2]={"text",_[8]}
_[1]={"text",_[7]}
return {_[1],_[2],_[3],_[4],_[5],_[6]}
--[[
{ "text", { {
tags = {},
@ -34,5 +38,9 @@ return {_[1],_[2],_[3],_[4],_[5]}
tags = {},
text = "decorators # tag ~ condition $ fn"
} } }
{ "text", { {
tags = {},
text = "sub [text]"
} } }
{ "return" }
]]--