From 7295e9efe092fca4ab6eebf6408af93d5f56dd80 Mon Sep 17 00:00:00 2001 From: Li Jin Date: Sun, 15 Aug 2021 01:35:20 +0800 Subject: fix vararg issues. add new spec. --- spec/inputs/vararg.yue | 56 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 spec/inputs/vararg.yue (limited to 'spec') diff --git a/spec/inputs/vararg.yue b/spec/inputs/vararg.yue new file mode 100644 index 0000000..c7b8ebf --- /dev/null +++ b/spec/inputs/vararg.yue @@ -0,0 +1,56 @@ +join = (...) -> + f_with with a + \func! + f_with with a + \func ... + + f_listcomp [items[i] for i = 1, 10] + f_listcomp [items[i] ... for i = 1, 10] + f_listcomp [item for item in *items] + f_listcomp [item ... for item in *items] + + f_class class A + func! + f_class class A + func ... + + f_tblcomp {k, v for k, v in pairs tb} + f_tblcomp {k, v ... for k, v in pairs tb} + f_tblcomp {item, true for item in *items} + f_tblcomp {item(...), true for item in *items} + + f_do do + func! + f_do do + func ... + + f_while while false + func! + f_while while false + func ... + + f_if if false + func! + f_if if false + func ... + + f_unless unless true + func! + f_unless unless true + func ... + + f_switch switch x + when "abc" + func! + f_switch switch x + when "abc" + func ... + + f_eop func?! + f_eop func? ... + + f_colon f!\func + f_colon f(...)\func + + nil + -- cgit v1.2.3-55-g6feb