aboutsummaryrefslogtreecommitdiff
path: root/spec/inputs
diff options
context:
space:
mode:
authorLi Jin <dragon-fly@qq.com>2020-05-02 14:41:40 +0800
committerLi Jin <dragon-fly@qq.com>2020-05-02 14:41:40 +0800
commit6402a8896c78440aee03cc4b7bb315fc236e6ff8 (patch)
treea5c23153a2285ae4ae79d9b1ff5b64f39f7c379f /spec/inputs
parent5eac89411f056e4e6ad56c9a41944a341780d68b (diff)
downloadyuescript-6402a8896c78440aee03cc4b7bb315fc236e6ff8.tar.gz
yuescript-6402a8896c78440aee03cc4b7bb315fc236e6ff8.tar.bz2
yuescript-6402a8896c78440aee03cc4b7bb315fc236e6ff8.zip
fix Moonscript issue 416: ambiguous Lua output in some cases.
Diffstat (limited to 'spec/inputs')
-rw-r--r--spec/inputs/ambiguous.moon26
1 files changed, 26 insertions, 0 deletions
diff --git a/spec/inputs/ambiguous.moon b/spec/inputs/ambiguous.moon
new file mode 100644
index 0000000..a5980db
--- /dev/null
+++ b/spec/inputs/ambiguous.moon
@@ -0,0 +1,26 @@
1import bind from grasp
2(bind stmt) color: "Red"
3
4a = 'b'
5c = d
6(a b) c d
7import c from d
8(a b) c d
9(c d) a b
10a, b = c, d
11(d a) c
12
13macro block f = (func,arg)-> "(#{func}) #{arg}"
14for i = 1, 10
15 a = ->
16 $f print, 1
17 a = f
18 $f print, 2
19 if cond
20 $f print, 3
21 ::abc::
22 (print) 4
23 goto abc
24 (print) 5
25nil
26