mirror of
https://github.com/Reuh/anselme.git
synced 2025-10-28 17:19:31 +00:00
Fix scoping with mutable variables
This commit is contained in:
parent
16d0bb8d7a
commit
bb45cc8fdd
16 changed files with 1243 additions and 38 deletions
131
test/tests/scope checkpoint mutable.lua
Normal file
131
test/tests/scope checkpoint mutable.lua
Normal file
|
|
@ -0,0 +1,131 @@
|
|||
local _={}
|
||||
_[59]={}
|
||||
_[58]={}
|
||||
_[57]={}
|
||||
_[56]={}
|
||||
_[55]={}
|
||||
_[54]={}
|
||||
_[53]={}
|
||||
_[52]={}
|
||||
_[51]={}
|
||||
_[50]={}
|
||||
_[49]={}
|
||||
_[48]={}
|
||||
_[47]={}
|
||||
_[46]={}
|
||||
_[45]={}
|
||||
_[44]={}
|
||||
_[43]={}
|
||||
_[42]={}
|
||||
_[41]={}
|
||||
_[40]={text="[1, 2, 3, 4, 5]",tags=_[59]}
|
||||
_[39]={text="l: ",tags=_[58]}
|
||||
_[38]={text="FINAL",tags=_[57]}
|
||||
_[37]={text="[1, 2, 3, 4, 5]",tags=_[56]}
|
||||
_[36]={text="f2: ",tags=_[55]}
|
||||
_[35]={text="END REC",tags=_[54]}
|
||||
_[34]={text="[1, 2, 3, 4]",tags=_[53]}
|
||||
_[33]={text="f2: ",tags=_[52]}
|
||||
_[32]={text="CHECK",tags=_[51]}
|
||||
_[31]={text="[1, 2, 3]",tags=_[50]}
|
||||
_[30]={text=" ",tags=_[49]}
|
||||
_[29]={text="[1, 2, 3]",tags=_[48]}
|
||||
_[28]={text="f1: ",tags=_[47]}
|
||||
_[27]={text="REC",tags=_[46]}
|
||||
_[26]={text="CHECK",tags=_[45]}
|
||||
_[25]={text="[1, 2]",tags=_[44]}
|
||||
_[24]={text=" ",tags=_[43]}
|
||||
_[23]={text="[1, 2]",tags=_[42]}
|
||||
_[22]={text="f1: ",tags=_[41]}
|
||||
_[21]={_[39],_[40]}
|
||||
_[20]={_[38]}
|
||||
_[19]={_[36],_[37]}
|
||||
_[18]={_[35]}
|
||||
_[17]={_[33],_[34]}
|
||||
_[16]={_[32]}
|
||||
_[15]={_[28],_[29],_[30],_[31]}
|
||||
_[14]={_[27]}
|
||||
_[13]={_[26]}
|
||||
_[12]={_[22],_[23],_[24],_[25]}
|
||||
_[11]={"return"}
|
||||
_[10]={"text",_[21]}
|
||||
_[9]={"text",_[20]}
|
||||
_[8]={"text",_[19]}
|
||||
_[7]={"text",_[18]}
|
||||
_[6]={"text",_[17]}
|
||||
_[5]={"text",_[16]}
|
||||
_[4]={"text",_[15]}
|
||||
_[3]={"text",_[14]}
|
||||
_[2]={"text",_[13]}
|
||||
_[1]={"text",_[12]}
|
||||
return {_[1],_[2],_[3],_[4],_[5],_[6],_[7],_[8],_[9],_[10],_[11]}
|
||||
--[[
|
||||
{ "text", { {
|
||||
tags = {},
|
||||
text = "f1: "
|
||||
}, {
|
||||
tags = {},
|
||||
text = "[1, 2]"
|
||||
}, {
|
||||
tags = {},
|
||||
text = " "
|
||||
}, {
|
||||
tags = {},
|
||||
text = "[1, 2]"
|
||||
} } }
|
||||
{ "text", { {
|
||||
tags = {},
|
||||
text = "CHECK"
|
||||
} } }
|
||||
{ "text", { {
|
||||
tags = {},
|
||||
text = "REC"
|
||||
} } }
|
||||
{ "text", { {
|
||||
tags = {},
|
||||
text = "f1: "
|
||||
}, {
|
||||
tags = {},
|
||||
text = "[1, 2, 3]"
|
||||
}, {
|
||||
tags = {},
|
||||
text = " "
|
||||
}, {
|
||||
tags = {},
|
||||
text = "[1, 2, 3]"
|
||||
} } }
|
||||
{ "text", { {
|
||||
tags = {},
|
||||
text = "CHECK"
|
||||
} } }
|
||||
{ "text", { {
|
||||
tags = {},
|
||||
text = "f2: "
|
||||
}, {
|
||||
tags = {},
|
||||
text = "[1, 2, 3, 4]"
|
||||
} } }
|
||||
{ "text", { {
|
||||
tags = {},
|
||||
text = "END REC"
|
||||
} } }
|
||||
{ "text", { {
|
||||
tags = {},
|
||||
text = "f2: "
|
||||
}, {
|
||||
tags = {},
|
||||
text = "[1, 2, 3, 4, 5]"
|
||||
} } }
|
||||
{ "text", { {
|
||||
tags = {},
|
||||
text = "FINAL"
|
||||
} } }
|
||||
{ "text", { {
|
||||
tags = {},
|
||||
text = "l: "
|
||||
}, {
|
||||
tags = {},
|
||||
text = "[1, 2, 3, 4, 5]"
|
||||
} } }
|
||||
{ "return" }
|
||||
]]--
|
||||
Loading…
Add table
Add a link
Reference in a new issue