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/local.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/local.yue')
-rw-r--r-- | spec/inputs/local.yue | 94 |
1 files changed, 94 insertions, 0 deletions
diff --git a/spec/inputs/local.yue b/spec/inputs/local.yue new file mode 100644 index 0000000..33251a9 --- /dev/null +++ b/spec/inputs/local.yue | |||
@@ -0,0 +1,94 @@ | |||
1 | |||
2 | do | ||
3 | local a | ||
4 | local a,b,c | ||
5 | |||
6 | b,g = 23232 | ||
7 | |||
8 | |||
9 | do | ||
10 | x = 1212 | ||
11 | something = -> | ||
12 | local x | ||
13 | x = 1212 | ||
14 | |||
15 | do | ||
16 | local * | ||
17 | y = 2323 | ||
18 | z = 2323 | ||
19 | |||
20 | do | ||
21 | local * | ||
22 | print "Nothing Here!" | ||
23 | |||
24 | do | ||
25 | local ^ | ||
26 | x = 3434 | ||
27 | y = 3434 | ||
28 | X = 3434 | ||
29 | Y = "yeah" | ||
30 | |||
31 | do | ||
32 | local ^ | ||
33 | x,y = "a", "b" | ||
34 | |||
35 | do | ||
36 | local * | ||
37 | x,y = "a", "b" | ||
38 | |||
39 | |||
40 | do | ||
41 | local * | ||
42 | if something | ||
43 | x = 2323 | ||
44 | |||
45 | do | ||
46 | local * | ||
47 | do | ||
48 | x = "one" | ||
49 | |||
50 | x = 100 | ||
51 | |||
52 | do | ||
53 | x = "two" | ||
54 | |||
55 | do | ||
56 | local * | ||
57 | k = if what | ||
58 | 10 | ||
59 | x = 100 | ||
60 | |||
61 | {:a,:b, :c} = y | ||
62 | |||
63 | |||
64 | do | ||
65 | local * | ||
66 | |||
67 | a = 100 | ||
68 | print "hi" | ||
69 | b = 200 | ||
70 | |||
71 | local * | ||
72 | c = 100 | ||
73 | print "hi" | ||
74 | d = 200 | ||
75 | d = 2323 | ||
76 | |||
77 | |||
78 | do | ||
79 | local ^ | ||
80 | lowercase = 5 | ||
81 | Uppercase = 3 | ||
82 | |||
83 | class One | ||
84 | Five = 6 | ||
85 | |||
86 | class Two | ||
87 | class No | ||
88 | |||
89 | do | ||
90 | local * | ||
91 | -- this generates a nil value in the body | ||
92 | for a in *{} do _ = a | ||
93 | |||
94 | g = 2323 -- test if anything leaked | ||