aboutsummaryrefslogtreecommitdiff
path: root/spec/outputs/assign.lua
diff options
context:
space:
mode:
authorLi Jin <dragon-fly@qq.com>2021-10-12 10:04:44 +0800
committerLi Jin <dragon-fly@qq.com>2021-10-12 10:04:44 +0800
commit60a979e224f26117f5be82bfca757a2483cef0fd (patch)
tree7c6af44f6dcada1f23979b820ba830251997b161 /spec/outputs/assign.lua
parenta19b242cbaf53721b20a3163dd06f43e9ef2b487 (diff)
downloadyuescript-60a979e224f26117f5be82bfca757a2483cef0fd.tar.gz
yuescript-60a979e224f26117f5be82bfca757a2483cef0fd.tar.bz2
yuescript-60a979e224f26117f5be82bfca757a2483cef0fd.zip
fix test.
Diffstat (limited to 'spec/outputs/assign.lua')
-rw-r--r--spec/outputs/assign.lua44
1 files changed, 44 insertions, 0 deletions
diff --git a/spec/outputs/assign.lua b/spec/outputs/assign.lua
new file mode 100644
index 0000000..628f763
--- /dev/null
+++ b/spec/outputs/assign.lua
@@ -0,0 +1,44 @@
1local _
2_ = function()
3 local joop = 2302
4 return function(hi)
5 local d = 100
6 hi = 1021
7 local a, b, c
8 a, b, c, d = 1, 2, 3, 4
9 local hello
10 hello[232], (5 + 5)[121], hello, x[99] = 100, 200, 300
11 joop = 12
12 end
13end
14local joop = 2345
15local a, b
16if hello then
17 a, b = "hello"
18else
19 a, b = "nothing", "yeah"
20end
21if hello then
22 if yeah then
23 a, b = "one", "two"
24 else
25 a, b = "mmhh"
26 end
27else
28 print("the other")
29 a, b = "nothing", "yeah"
30end
31local c, d
32if true then
33 c, d = 1, 2
34end
35local x
36do
37 local f = getHandler()
38 if f then
39 x = ((function()
40 f()
41 return 123
42 end)())
43 end
44end