From ca1ed557769352c0ac0ca7804dd25e18c1fdf2e1 Mon Sep 17 00:00:00 2001 From: Li Jin Date: Fri, 1 Apr 2022 17:47:27 +0800 Subject: fix some ambiguous syntax caused by arg table block. --- spec/inputs/ambiguous.yue | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) (limited to 'spec/inputs/ambiguous.yue') diff --git a/spec/inputs/ambiguous.yue b/spec/inputs/ambiguous.yue index 0e09979..3ae0bfc 100644 --- a/spec/inputs/ambiguous.yue +++ b/spec/inputs/ambiguous.yue @@ -28,4 +28,34 @@ do global * $v! +do + f + :v + + tb = while f + :v + + repeat + print v + until f + :v + + with f + :v = tb + .x = 1 + + x = if f + :v + + x = switch f + :v + when f + :v + + nums = for num = 1, len + :num + + objects = for item in *items + name: item + nil -- cgit v1.2.3-55-g6feb