diff options
author | Li Jin <dragon-fly@qq.com> | 2021-02-17 11:22:07 +0800 |
---|---|---|
committer | Li Jin <dragon-fly@qq.com> | 2021-02-17 11:22:07 +0800 |
commit | 7066392d1c974065181d95d93274136dcd625d43 (patch) | |
tree | cf51eafc2c52cbc12246a306bca172d799193d30 /spec/inputs/ambiguous.yue | |
parent | 90cd12ad9ef465f3e435e1bd034dcfbe4e19d016 (diff) | |
download | yuescript-7066392d1c974065181d95d93274136dcd625d43.tar.gz yuescript-7066392d1c974065181d95d93274136dcd625d43.tar.bz2 yuescript-7066392d1c974065181d95d93274136dcd625d43.zip |
stop reusing variables, rename project.
Diffstat (limited to 'spec/inputs/ambiguous.yue')
-rw-r--r-- | spec/inputs/ambiguous.yue | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/spec/inputs/ambiguous.yue b/spec/inputs/ambiguous.yue new file mode 100644 index 0000000..d147e8e --- /dev/null +++ b/spec/inputs/ambiguous.yue | |||
@@ -0,0 +1,26 @@ | |||
1 | import bind from grasp | ||
2 | (bind stmt) color: "Red" | ||
3 | |||
4 | a = 'b' | ||
5 | c = d | ||
6 | (a b) c d | ||
7 | import c from d | ||
8 | (a b) c d | ||
9 | (c d) a b | ||
10 | a, b = c, d | ||
11 | (d a) c | ||
12 | |||
13 | macro f = (func,arg)-> "(#{func}) #{arg}" | ||
14 | for 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 | ||
25 | nil | ||
26 | |||