mirror of
https://github.com/Reuh/anselme.git
synced 2025-10-28 09:09:31 +00:00
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.
This commit is contained in:
parent
14d348bad9
commit
f2e74c94c9
31 changed files with 894 additions and 343 deletions
132
test/tests/choice with decorators.lua
Normal file
132
test/tests/choice with decorators.lua
Normal file
|
|
@ -0,0 +1,132 @@
|
|||
local _={}
|
||||
_[67]={3}
|
||||
_[66]={12}
|
||||
_[65]={3}
|
||||
_[64]={25}
|
||||
_[63]={}
|
||||
_[62]={}
|
||||
_[61]={}
|
||||
_[60]={}
|
||||
_[59]={}
|
||||
_[58]={}
|
||||
_[57]={}
|
||||
_[56]={text="b",tags=_[67]}
|
||||
_[55]={text="a",tags=_[66]}
|
||||
_[54]={}
|
||||
_[53]={text="b",tags=_[65]}
|
||||
_[52]={}
|
||||
_[51]={text="b",tags=_[64]}
|
||||
_[50]={text="a",tags=_[63]}
|
||||
_[49]={}
|
||||
_[48]={text="b",tags=_[62]}
|
||||
_[47]={}
|
||||
_[46]={text="b",tags=_[61]}
|
||||
_[45]={text="a",tags=_[60]}
|
||||
_[44]={}
|
||||
_[43]={text="b",tags=_[59]}
|
||||
_[42]={text="a",tags=_[58]}
|
||||
_[41]={text="-> a",tags=_[57]}
|
||||
_[40]={_[56]}
|
||||
_[39]={_[55]}
|
||||
_[38]={text="-> b",tags=_[54]}
|
||||
_[37]={_[53]}
|
||||
_[36]={text="-> b",tags=_[52]}
|
||||
_[35]={_[51]}
|
||||
_[34]={_[50]}
|
||||
_[33]={text="-> b",tags=_[49]}
|
||||
_[32]={_[48]}
|
||||
_[31]={text="-> b",tags=_[47]}
|
||||
_[30]={_[46]}
|
||||
_[29]={_[45]}
|
||||
_[28]={text="-> a",tags=_[44]}
|
||||
_[27]={_[43]}
|
||||
_[26]={_[42]}
|
||||
_[25]={_[41]}
|
||||
_[24]={_[39],_[40]}
|
||||
_[23]={_[38]}
|
||||
_[22]={_[37]}
|
||||
_[21]={_[36]}
|
||||
_[20]={_[34],_[35]}
|
||||
_[19]={_[33]}
|
||||
_[18]={_[32]}
|
||||
_[17]={_[31]}
|
||||
_[16]={_[29],_[30]}
|
||||
_[15]={_[28]}
|
||||
_[14]={_[26],_[27]}
|
||||
_[13]={"return"}
|
||||
_[12]={"text",_[25]}
|
||||
_[11]={"choice",_[24]}
|
||||
_[10]={"text",_[23]}
|
||||
_[9]={"choice",_[22]}
|
||||
_[8]={"text",_[21]}
|
||||
_[7]={"choice",_[20]}
|
||||
_[6]={"text",_[19]}
|
||||
_[5]={"choice",_[18]}
|
||||
_[4]={"text",_[17]}
|
||||
_[3]={"choice",_[16]}
|
||||
_[2]={"text",_[15]}
|
||||
_[1]={"choice",_[14]}
|
||||
return {_[1],_[2],_[3],_[4],_[5],_[6],_[7],_[8],_[9],_[10],_[11],_[12],_[13]}
|
||||
--[[
|
||||
{ "choice", { { {
|
||||
tags = {},
|
||||
text = "a"
|
||||
} }, { {
|
||||
tags = {},
|
||||
text = "b"
|
||||
} } } }
|
||||
{ "text", { {
|
||||
tags = {},
|
||||
text = "-> a"
|
||||
} } }
|
||||
{ "choice", { { {
|
||||
tags = {},
|
||||
text = "a"
|
||||
} }, { {
|
||||
tags = {},
|
||||
text = "b"
|
||||
} } } }
|
||||
{ "text", { {
|
||||
tags = {},
|
||||
text = "-> b"
|
||||
} } }
|
||||
{ "choice", { { {
|
||||
tags = {},
|
||||
text = "b"
|
||||
} } } }
|
||||
{ "text", { {
|
||||
tags = {},
|
||||
text = "-> b"
|
||||
} } }
|
||||
{ "choice", { { {
|
||||
tags = {},
|
||||
text = "a"
|
||||
} }, { {
|
||||
tags = { 25 },
|
||||
text = "b"
|
||||
} } } }
|
||||
{ "text", { {
|
||||
tags = {},
|
||||
text = "-> b"
|
||||
} } }
|
||||
{ "choice", { { {
|
||||
tags = { 3 },
|
||||
text = "b"
|
||||
} } } }
|
||||
{ "text", { {
|
||||
tags = {},
|
||||
text = "-> b"
|
||||
} } }
|
||||
{ "choice", { { {
|
||||
tags = { 12 },
|
||||
text = "a"
|
||||
} }, { {
|
||||
tags = { 3 },
|
||||
text = "b"
|
||||
} } } }
|
||||
{ "text", { {
|
||||
tags = {},
|
||||
text = "-> a"
|
||||
} } }
|
||||
{ "return" }
|
||||
]]--
|
||||
Loading…
Add table
Add a link
Reference in a new issue