mirror of
https://github.com/Reuh/anselme.git
synced 2025-10-29 01:29:31 +00:00
Add maps; remove map emulation functionality from list; function and tags now internally use maps instead of lists
This commit is contained in:
parent
bac5cdde01
commit
95462391e3
20 changed files with 699 additions and 139 deletions
68
test/tests/list index.lua
Normal file
68
test/tests/list index.lua
Normal file
|
|
@ -0,0 +1,68 @@
|
|||
local _={}
|
||||
_[29]={}
|
||||
_[28]={}
|
||||
_[27]={}
|
||||
_[26]={}
|
||||
_[25]={}
|
||||
_[24]={}
|
||||
_[23]={}
|
||||
_[22]={}
|
||||
_[21]={}
|
||||
_[20]={}
|
||||
_[19]={text="3",tags=_[29]}
|
||||
_[18]={text=" == ",tags=_[28]}
|
||||
_[17]={text="3",tags=_[27]}
|
||||
_[16]={text="2",tags=_[26]}
|
||||
_[15]={text=" == ",tags=_[25]}
|
||||
_[14]={text="2",tags=_[24]}
|
||||
_[13]={text="1",tags=_[23]}
|
||||
_[12]={text=" == ",tags=_[22]}
|
||||
_[11]={text="1",tags=_[21]}
|
||||
_[10]={text="[1, 2, 3]",tags=_[20]}
|
||||
_[9]={_[17],_[18],_[19]}
|
||||
_[8]={_[14],_[15],_[16]}
|
||||
_[7]={_[11],_[12],_[13]}
|
||||
_[6]={_[10]}
|
||||
_[5]={"error","list index out of bounds; in Lua function \"()\"; at test/tests/list index.ans:11"}
|
||||
_[4]={"text",_[9]}
|
||||
_[3]={"text",_[8]}
|
||||
_[2]={"text",_[7]}
|
||||
_[1]={"text",_[6]}
|
||||
return {_[1],_[2],_[3],_[4],_[5]}
|
||||
--[[
|
||||
{ "text", { {
|
||||
tags = {},
|
||||
text = "[1, 2, 3]"
|
||||
} } }
|
||||
{ "text", { {
|
||||
tags = {},
|
||||
text = "1"
|
||||
}, {
|
||||
tags = {},
|
||||
text = " == "
|
||||
}, {
|
||||
tags = {},
|
||||
text = "1"
|
||||
} } }
|
||||
{ "text", { {
|
||||
tags = {},
|
||||
text = "2"
|
||||
}, {
|
||||
tags = {},
|
||||
text = " == "
|
||||
}, {
|
||||
tags = {},
|
||||
text = "2"
|
||||
} } }
|
||||
{ "text", { {
|
||||
tags = {},
|
||||
text = "3"
|
||||
}, {
|
||||
tags = {},
|
||||
text = " == "
|
||||
}, {
|
||||
tags = {},
|
||||
text = "3"
|
||||
} } }
|
||||
{ "error", 'list index out of bounds; in Lua function "()"; at test/tests/list index.ans:11' }
|
||||
]]--
|
||||
Loading…
Add table
Add a link
Reference in a new issue