From 10afeaf30bfe03774c12908235520eebf0c192ee Mon Sep 17 00:00:00 2001 From: Li Jin Date: Mon, 25 Apr 2022 13:19:26 +0800 Subject: add spread syntax support for table block. fix a gcc compiler issue. update doc. --- spec/inputs/return.yue | 13 +++++++++++++ spec/inputs/tables.yue | 23 +++++++++++++++++++++++ 2 files changed, 36 insertions(+) (limited to 'spec/inputs') diff --git a/spec/inputs/return.yue b/spec/inputs/return.yue index f170ffd..96fa0cd 100644 --- a/spec/inputs/return.yue +++ b/spec/inputs/return.yue @@ -49,6 +49,19 @@ do else b +do + return + :value + itemA: 123 + itemB: "abc" + +do + return + * 1 + * 2 + * ...three + * 4 + _ = -> a\b do a\b diff --git a/spec/inputs/tables.yue b/spec/inputs/tables.yue index 3a245a7..e1b9e1d 100644 --- a/spec/inputs/tables.yue +++ b/spec/inputs/tables.yue @@ -281,5 +281,28 @@ specializedB = { else: false } +parts = + * "shoulders" + * "knees" + +lyrics = + * "head" + * ...parts + * "and" + * "toes" + +tbBlock = + sub: + :value + * ...items + * ... + +func + * ...items + :value + * ... + k: v + * ... + nil -- cgit v1.2.3-55-g6feb