aboutsummaryrefslogtreecommitdiff
path: root/spec/inputs/ambiguous.yue
diff options
context:
space:
mode:
authorLi Jin <dragon-fly@qq.com>2022-04-01 17:47:27 +0800
committerLi Jin <dragon-fly@qq.com>2022-04-01 17:47:27 +0800
commitca1ed557769352c0ac0ca7804dd25e18c1fdf2e1 (patch)
treebf86d3990b90054f8d82aaf87cb9efae444a08ce /spec/inputs/ambiguous.yue
parent7be6c300256bfe411942a7ccc66f6bc3afa7390d (diff)
downloadyuescript-ca1ed557769352c0ac0ca7804dd25e18c1fdf2e1.tar.gz
yuescript-ca1ed557769352c0ac0ca7804dd25e18c1fdf2e1.tar.bz2
yuescript-ca1ed557769352c0ac0ca7804dd25e18c1fdf2e1.zip
fix some ambiguous syntax caused by arg table block.
Diffstat (limited to 'spec/inputs/ambiguous.yue')
-rw-r--r--spec/inputs/ambiguous.yue30
1 files changed, 30 insertions, 0 deletions
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
28 global * 28 global *
29 $v! 29 $v!
30 30
31do
32 f
33 :v
34
35 tb = while f
36 :v
37
38 repeat
39 print v
40 until f
41 :v
42
43 with f
44 :v = tb
45 .x = 1
46
47 x = if f
48 :v
49
50 x = switch f
51 :v
52 when f
53 :v
54
55 nums = for num = 1, len
56 :num
57
58 objects = for item in *items
59 name: item
60
31nil 61nil