aboutsummaryrefslogtreecommitdiff
path: root/spec/inputs
diff options
context:
space:
mode:
authorLi Jin <dragon-fly@qq.com>2022-04-24 11:26:46 +0800
committerLi Jin <dragon-fly@qq.com>2022-04-24 11:26:46 +0800
commitfe6d146bc4454d8096ddd0543d7142db3da5da5b (patch)
treedcdc4d08a8934b1b306e60f9f802ff11f22ce22b /spec/inputs
parent84b93d0e43e7248fd00df6957d55a954c48628d7 (diff)
downloadyuescript-fe6d146bc4454d8096ddd0543d7142db3da5da5b.tar.gz
yuescript-fe6d146bc4454d8096ddd0543d7142db3da5da5b.tar.bz2
yuescript-fe6d146bc4454d8096ddd0543d7142db3da5da5b.zip
fix spreading syntax behavior.
Diffstat (limited to 'spec/inputs')
-rw-r--r--spec/inputs/tables.yue25
1 files changed, 25 insertions, 0 deletions
diff --git a/spec/inputs/tables.yue b/spec/inputs/tables.yue
index 4cd9b4d..649c1dc 100644
--- a/spec/inputs/tables.yue
+++ b/spec/inputs/tables.yue
@@ -237,5 +237,30 @@ menus =
237 click: -> 237 click: ->
238 } 238 }
239 239
240tb = {...other}
241
242tbMix = {
243 1, 2, 3
244 ... with item
245 .x = 1
246 \func!
247 "a", "b", "c"
248 ...func?!
249 key: "value"
250 ... -- perform the Lua table behavior here
251}
252
253tbMixA = {
254 ...[i for i = 1, 10]
255 11
256}
257
258tbMixB = {
259 ... ... -- only the first item in vararg been accessed here
260 ... {...}
261 ... {......}
262 1, 2, 3
263}
264
240nil 265nil
241 266