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/assign.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/assign.yue')
-rw-r--r-- | spec/inputs/assign.yue | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/spec/inputs/assign.yue b/spec/inputs/assign.yue new file mode 100644 index 0000000..dac2ba3 --- /dev/null +++ b/spec/inputs/assign.yue | |||
@@ -0,0 +1,33 @@ | |||
1 | |||
2 | _ = -> | ||
3 | joop = 2302 | ||
4 | |||
5 | (hi) -> | ||
6 | d = 100 | ||
7 | hi = 1021 | ||
8 | |||
9 | a,b,c,d = 1,2,3,4 | ||
10 | |||
11 | hello[232], (5+5)[121], hello, x[99] = 100, 200, 300 | ||
12 | |||
13 | joop = 12 | ||
14 | |||
15 | joop = 2345 | ||
16 | |||
17 | a, b = if hello | ||
18 | "hello" | ||
19 | else | ||
20 | "nothing", "yeah" | ||
21 | |||
22 | |||
23 | a, b = if hello | ||
24 | if yeah then "one", "two" else "mmhh" | ||
25 | else | ||
26 | print "the other" | ||
27 | "nothing", "yeah" | ||
28 | |||
29 | c, d = 1, 2 if true | ||
30 | |||
31 | x = (do | ||
32 | f! | ||
33 | 123) if f = getHandler! | ||