aboutsummaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorLi Jin <dragon-fly@qq.com>2020-07-06 15:36:16 +0800
committerLi Jin <dragon-fly@qq.com>2020-07-06 15:36:16 +0800
commit7e057d0dd7048d1aa8fbcadb9998902462a384d6 (patch)
tree448fb6d5e044cbd8d12c10ff2b4b9c1f6fa2d169 /spec
parent7682305156719aad1397d9eb63e97ecdb8393316 (diff)
downloadyuescript-7e057d0dd7048d1aa8fbcadb9998902462a384d6.tar.gz
yuescript-7e057d0dd7048d1aa8fbcadb9998902462a384d6.tar.bz2
yuescript-7e057d0dd7048d1aa8fbcadb9998902462a384d6.zip
fix compile error for "t = { [ [[abc]] ] : 42 }", make "t = {[[abc]]:42}" valid codes.
Diffstat (limited to 'spec')
-rw-r--r--spec/inputs/syntax.moon2
-rw-r--r--spec/inputs/tables.moon2
2 files changed, 4 insertions, 0 deletions
diff --git a/spec/inputs/syntax.moon b/spec/inputs/syntax.moon
index b1a64d3..ccee5f2 100644
--- a/spec/inputs/syntax.moon
+++ b/spec/inputs/syntax.moon
@@ -68,11 +68,13 @@ something"else"
68 68
69_ = something[[hey]] * 2 69_ = something[[hey]] * 2
70_ = something[======[hey]======] * 2 70_ = something[======[hey]======] * 2
71_ = something[ [======[hey]======] ] * 2
71 72
72 73
73_ = something'else', 2 74_ = something'else', 2
74_ = something"else", 2 75_ = something"else", 2
75_ = something[[else]], 2 76_ = something[[else]], 2
77_ = something[ [[else]] ], 2
76 78
77something 'else', 2 79something 'else', 2
78something "else", 2 80something "else", 2
diff --git a/spec/inputs/tables.moon b/spec/inputs/tables.moon
index d7596f5..9383538 100644
--- a/spec/inputs/tables.moon
+++ b/spec/inputs/tables.moon
@@ -98,7 +98,9 @@ t = {
98xam = { 98xam = {
99 hello: 1234 99 hello: 1234
100 "hello": 12354 100 "hello": 12354
101 [[hello]]: 12354
101 ["hello"]: 12354 102 ["hello"]: 12354
103 [ [[hello]] ]: 12354
102} 104}
103 105
104 106