aboutsummaryrefslogtreecommitdiff
path: root/spec/inputs
diff options
context:
space:
mode:
authorLi Jin <dragon-fly@qq.com>2022-02-14 15:35:54 +0800
committerLi Jin <dragon-fly@qq.com>2022-02-14 15:35:54 +0800
commitddb0b9deb720368a425d00bce0c0352469b55911 (patch)
tree8924f0a6e4d851c2f8545efba2d42c43581fd090 /spec/inputs
parent2c2cad4b4d3680bb30474b38ebed0f938e82636e (diff)
downloadyuescript-ddb0b9deb720368a425d00bce0c0352469b55911.tar.gz
yuescript-ddb0b9deb720368a425d00bce0c0352469b55911.tar.bz2
yuescript-ddb0b9deb720368a425d00bce0c0352469b55911.zip
fixing issue #77. change table appending syntax to: tb[] = 1
Diffstat (limited to 'spec/inputs')
-rw-r--r--spec/inputs/syntax.yue17
1 files changed, 13 insertions, 4 deletions
diff --git a/spec/inputs/syntax.yue b/spec/inputs/syntax.yue
index 67d3a27..e7f0a8d 100644
--- a/spec/inputs/syntax.yue
+++ b/spec/inputs/syntax.yue
@@ -188,16 +188,25 @@ a.b[1].c[2 + 3] += 1
188with tb 188with tb
189 .a.c += 1 189 .a.c += 1
190 190
191tb #= 10 191tb[] = 10
192a.b.c #= 1 192a.b.c[] = 1
193x #= if v 193x[] = if v
194 1 194 1
195else 195else
196 2 196 2
197with tb 197with tb
198 .b.c #= with vec 198 .b.c[] = with vec
199 .x = 1 199 .x = 1
200 .y = 2 200 .y = 2
201a
202 .b.c
203 .d\f!
204 .g[] = 1
205
206tb = {}
207tb[] = 1
208tb[] = 2
209tb[] = 3
201 210
202x = 0 211x = 0
203_ = (if ntype(v) == "fndef" then x += 1) for v in *values 212_ = (if ntype(v) == "fndef" then x += 1) for v in *values