mirror of
https://github.com/Reuh/anselme.git
synced 2025-10-28 00:59: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
120
test/tests/scope checkpoint mutable ter error.lua
Normal file
120
test/tests/scope checkpoint mutable ter error.lua
Normal file
|
|
@ -0,0 +1,120 @@
|
|||
local _={}
|
||||
_[54]={}
|
||||
_[53]={}
|
||||
_[52]={}
|
||||
_[51]={}
|
||||
_[50]={}
|
||||
_[49]={}
|
||||
_[48]={}
|
||||
_[47]={}
|
||||
_[46]={}
|
||||
_[45]={}
|
||||
_[44]={}
|
||||
_[43]={}
|
||||
_[42]={}
|
||||
_[41]={}
|
||||
_[40]={}
|
||||
_[39]={}
|
||||
_[38]={}
|
||||
_[37]={text="[1, [99, 12], 3, 4]",tags=_[54]}
|
||||
_[36]={text="l: ",tags=_[53]}
|
||||
_[35]={text="AFTER ERROR",tags=_[52]}
|
||||
_[34]={text="CHECK 2",tags=_[51]}
|
||||
_[33]={text="[1, [99, 12], 3, 4]",tags=_[50]}
|
||||
_[32]={text="f2: ",tags=_[49]}
|
||||
_[31]={text="CHECK",tags=_[48]}
|
||||
_[30]={text="[1, [99], 3, 4]",tags=_[47]}
|
||||
_[29]={text=" ",tags=_[46]}
|
||||
_[28]={text="[1, [99], 3, 4]",tags=_[45]}
|
||||
_[27]={text="f1: ",tags=_[44]}
|
||||
_[26]={text="REC",tags=_[43]}
|
||||
_[25]={text="CHECK",tags=_[42]}
|
||||
_[24]={text="[1, [99], 3]",tags=_[41]}
|
||||
_[23]={text=" ",tags=_[40]}
|
||||
_[22]={text="[1, [99], 3]",tags=_[39]}
|
||||
_[21]={text="f1: ",tags=_[38]}
|
||||
_[20]={_[36],_[37]}
|
||||
_[19]={_[35]}
|
||||
_[18]={_[34]}
|
||||
_[17]={_[32],_[33]}
|
||||
_[16]={_[31]}
|
||||
_[15]={_[27],_[28],_[29],_[30]}
|
||||
_[14]={_[26]}
|
||||
_[13]={_[25]}
|
||||
_[12]={_[21],_[22],_[23],_[24]}
|
||||
_[11]={"return"}
|
||||
_[10]={"text",_[20]}
|
||||
_[9]={"text",_[19]}
|
||||
_[8]={"error","t; in Lua function \"error\"; at test/tests/scope checkpoint mutable ter error.ans:36; at test/tests/scope checkpoint mutable ter error.ans:21; at test/tests/scope checkpoint mutable ter error.ans:40"}
|
||||
_[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, [99], 3]"
|
||||
}, {
|
||||
tags = {},
|
||||
text = " "
|
||||
}, {
|
||||
tags = {},
|
||||
text = "[1, [99], 3]"
|
||||
} } }
|
||||
{ "text", { {
|
||||
tags = {},
|
||||
text = "CHECK"
|
||||
} } }
|
||||
{ "text", { {
|
||||
tags = {},
|
||||
text = "REC"
|
||||
} } }
|
||||
{ "text", { {
|
||||
tags = {},
|
||||
text = "f1: "
|
||||
}, {
|
||||
tags = {},
|
||||
text = "[1, [99], 3, 4]"
|
||||
}, {
|
||||
tags = {},
|
||||
text = " "
|
||||
}, {
|
||||
tags = {},
|
||||
text = "[1, [99], 3, 4]"
|
||||
} } }
|
||||
{ "text", { {
|
||||
tags = {},
|
||||
text = "CHECK"
|
||||
} } }
|
||||
{ "text", { {
|
||||
tags = {},
|
||||
text = "f2: "
|
||||
}, {
|
||||
tags = {},
|
||||
text = "[1, [99, 12], 3, 4]"
|
||||
} } }
|
||||
{ "text", { {
|
||||
tags = {},
|
||||
text = "CHECK 2"
|
||||
} } }
|
||||
{ "error", 't; in Lua function "error"; at test/tests/scope checkpoint mutable ter error.ans:36; at test/tests/scope checkpoint mutable ter error.ans:21; at test/tests/scope checkpoint mutable ter error.ans:40' }
|
||||
{ "text", { {
|
||||
tags = {},
|
||||
text = "AFTER ERROR"
|
||||
} } }
|
||||
{ "text", { {
|
||||
tags = {},
|
||||
text = "l: "
|
||||
}, {
|
||||
tags = {},
|
||||
text = "[1, [99, 12], 3, 4]"
|
||||
} } }
|
||||
{ "return" }
|
||||
]]--
|
||||
Loading…
Add table
Add a link
Reference in a new issue