1
0
Fork 0
mirror of https://github.com/Reuh/anselme.git synced 2025-10-27 16:49:31 +00:00
anselme/test/tests/text escaping.lua
Étienne Reuh Fildadut f2e74c94c9 Changed a few things
* Integrated # and ~ decorators into the expression system. Created associated operators.
* # and ~ decorators only affect their current line. That's more useful...
* Fix our priority system to evaluate left-to-right instead of right-to-left (if there was a reason why I did it this way initially, I don't remember it so ¯\_(ツ)_/¯)
* a lotta internal changes

Various other small adjustments, see the diff of REFERENCE.md for details.
2021-11-28 01:43:54 +01:00

38 lines
No EOL
732 B
Lua

local _={}
_[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]}
--[[
{ "text", { {
tags = {},
text = "expression {a}"
} } }
{ "text", { {
tags = {},
text = 'quote "'
} } }
{ "text", { {
tags = {},
text = "other codes \n \\ \t"
} } }
{ "text", { {
tags = {},
text = "decorators # tag ~ condition $ fn"
} } }
{ "return" }
]]--