aboutsummaryrefslogtreecommitdiff
path: root/spec/inputs/tables.yue
diff options
context:
space:
mode:
authorLi Jin <dragon-fly@qq.com>2023-10-22 00:55:02 +0800
committerLi Jin <dragon-fly@qq.com>2023-10-22 00:55:02 +0800
commit652a8839f885b73fff57942a9db8b26e9cb5233b (patch)
tree0b24bb5610823a831ec0addbba37cb6200203b27 /spec/inputs/tables.yue
parentf61a4a1d9a1b979b8a0c2e8a9c194a284f42220f (diff)
downloadyuescript-652a8839f885b73fff57942a9db8b26e9cb5233b.tar.gz
yuescript-652a8839f885b73fff57942a9db8b26e9cb5233b.tar.bz2
yuescript-652a8839f885b73fff57942a9db8b26e9cb5233b.zip
fixing issues from #152.
Diffstat (limited to 'spec/inputs/tables.yue')
-rw-r--r--spec/inputs/tables.yue20
1 files changed, 20 insertions, 0 deletions
diff --git a/spec/inputs/tables.yue b/spec/inputs/tables.yue
index 0b5af46..53a53ae 100644
--- a/spec/inputs/tables.yue
+++ b/spec/inputs/tables.yue
@@ -40,6 +40,8 @@ ya = { 1,2,3, key: 100, 343, "hello", umm: 232 }
40x = { 1,2, 40x = { 1,2,
41 4343, 343 ,343 } 41 4343, 343 ,343 }
42 42
43x = [ 1,2,
44 4343, 343 ,343 ]
43 45
44g, p = { 46g, p = {
45 1,2, nowy: "yes", 3,4, 47 1,2, nowy: "yes", 3,4,
@@ -52,6 +54,12 @@ annother = {
52 6,7,8 54 6,7,8
53} 55}
54 56
57annother = [
58 1,2,3
59 3,4,5
60 6,7,8
61]
62
55yeah = { 63yeah = {
56 [232]: 3434, "helo" 64 [232]: 3434, "helo"
57 ice: "cake" 65 ice: "cake"
@@ -255,6 +263,11 @@ tbMixA = {
255 11 263 11
256} 264}
257 265
266tbMixA = [
267 ...[i for i = 1, 10]
268 11
269]
270
258tbMixB = { 271tbMixB = {
259 ... ... -- only the first item in vararg been accessed here 272 ... ... -- only the first item in vararg been accessed here
260 ... {...} 273 ... {...}
@@ -262,6 +275,13 @@ tbMixB = {
262 1, 2, 3 275 1, 2, 3
263} 276}
264 277
278tbMixB = [
279 ... ... -- only the first item in vararg been accessed here
280 ... {...}
281 ... {......}
282 1, 2, 3
283]
284
265const template = { 285const template = {
266 foo: "Hello" 286 foo: "Hello"
267 bar: "World" 287 bar: "World"