From 8acb48264d3ae87e5cdae2fea4207be22cf08a97 Mon Sep 17 00:00:00 2001 From: Li Jin Date: Mon, 8 Mar 2021 21:02:05 +0800 Subject: add new syntax for issue #41. fix a issue for destructure syntax with TableBlock. try fix luarocks installing problem again for issue #42. --- spec/inputs/destructure.yue | 23 ++++++++++++++++++++++- spec/inputs/metatable.yue | 11 +++++++++++ 2 files changed, 33 insertions(+), 1 deletion(-) (limited to 'spec') diff --git a/spec/inputs/destructure.yue b/spec/inputs/destructure.yue index 6b52441..c68045d 100644 --- a/spec/inputs/destructure.yue +++ b/spec/inputs/destructure.yue @@ -41,7 +41,28 @@ do "Bellagio, Italy 22021" } - {poet: {:name, address: {street, city}}} = futurists + do {poet: {:name, address: {street, city}}} = futurists + + do { + :sculptor + :painter + poet: + :name + address: + * street + * city + } = futurists + +do + a: + b: c + d: e = tb + +do + a: + * b: c + * d: e + * f = tb -- diff --git a/spec/inputs/metatable.yue b/spec/inputs/metatable.yue index 13ea917..100844c 100644 --- a/spec/inputs/metatable.yue +++ b/spec/inputs/metatable.yue @@ -48,4 +48,15 @@ with tb b = t#.close#.test c = t #.close# .test +#:mt = a +a = #:mt +a = #:__index:mt + +local index +#:__index:index = a +:index# = a + +do #:{new:ctor, :update} = a +do {new:ctor, :update} = a.# + nil -- cgit v1.2.3-55-g6feb