aboutsummaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
Diffstat (limited to 'spec')
-rw-r--r--spec/inputs/destructure.yue29
1 files changed, 29 insertions, 0 deletions
diff --git a/spec/inputs/destructure.yue b/spec/inputs/destructure.yue
index 7bf5a88..c46cef5 100644
--- a/spec/inputs/destructure.yue
+++ b/spec/inputs/destructure.yue
@@ -142,3 +142,32 @@ do
142 142
143 {:a},b = a\if(123) + t, 123 143 {:a},b = a\if(123) + t, 123
144 144
145do
146 {:name = "nameless", :job = "jobless"} = person
147
148 request = (url, options = {}) ->
149 {
150 :method = "GET"
151 :headers = {}
152 :parameters = {}
153 :payload = ""
154 :ok
155 :err
156 :final
157 } = options
158 res = makeRequest(url, method, parameters, payload, ok, err, final)
159 return res
160
161 {key1: {key2: value1 = 123}, :key3 = "abc"} = tb
162
163 {#: mt = {__index: {abc: 123}}, #: {:call# = (-> {}), :add#}} = tb
164
165 {x: {#: mtx = {}}, :y, z: zItem, :index# = -> nil} = tb
166
167 {#: {func: a.b(-> 123).c = item?.defVal}} = tb
168
169do
170 {#: mt = {}, sub#: subFunc} = tb.x
171
172do
173 {x: {#: mt = {}, sub#: subFunc}} = tb