From fe6d146bc4454d8096ddd0543d7142db3da5da5b Mon Sep 17 00:00:00 2001 From: Li Jin Date: Sun, 24 Apr 2022 11:26:46 +0800 Subject: fix spreading syntax behavior. --- spec/inputs/tables.yue | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) (limited to 'spec/inputs') 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 = click: -> } +tb = {...other} + +tbMix = { + 1, 2, 3 + ... with item + .x = 1 + \func! + "a", "b", "c" + ...func?! + key: "value" + ... -- perform the Lua table behavior here +} + +tbMixA = { + ...[i for i = 1, 10] + 11 +} + +tbMixB = { + ... ... -- only the first item in vararg been accessed here + ... {...} + ... {......} + 1, 2, 3 +} + nil -- cgit v1.2.3-55-g6feb