summaryrefslogtreecommitdiff
path: root/spec/inputs/destructure.yue
diff options
context:
space:
mode:
authorLi Jin <dragon-fly@qq.com>2025-11-21 12:21:04 +0800
committerLi Jin <dragon-fly@qq.com>2025-11-21 12:21:04 +0800
commit43dde2fff316051d03968e8efd313f19b53112fc (patch)
treeae3f99ce6edcd397b75002003048518ee33bae5b /spec/inputs/destructure.yue
parentb462de9d09d4708490161c7c16858bce2c9cb9b6 (diff)
downloadyuescript-0.29.9.tar.gz
yuescript-0.29.9.tar.bz2
yuescript-0.29.9.zip
Updated syntax.v0.29.9
* Added error check for mixed use of tabs and spaces. * Supported SimpleTable destructuring for ForEach syntax.
Diffstat (limited to '')
-rw-r--r--spec/inputs/destructure.yue10
1 files changed, 10 insertions, 0 deletions
diff --git a/spec/inputs/destructure.yue b/spec/inputs/destructure.yue
index b6250d0..179056c 100644
--- a/spec/inputs/destructure.yue
+++ b/spec/inputs/destructure.yue
@@ -278,5 +278,15 @@ do
278do 278do
279 {a, :abc, b, :def, ...sub, d, e} = tb 279 {a, :abc, b, :def, ...sub, d, e} = tb
280 280
281do
282 for {:a, :b} in *items
283 print a, b
284
285 for :a, :b in *items
286 print a, b
287
288 for :body in pairs data
289 print body if body
290
281nil 291nil
282 292