aboutsummaryrefslogtreecommitdiff
path: root/spec/outputs/plus.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/plus.lua
parenta19b242cbaf53721b20a3163dd06f43e9ef2b487 (diff)
downloadyuescript-60a979e224f26117f5be82bfca757a2483cef0fd.tar.gz
yuescript-60a979e224f26117f5be82bfca757a2483cef0fd.tar.bz2
yuescript-60a979e224f26117f5be82bfca757a2483cef0fd.zip
fix test.
Diffstat (limited to 'spec/outputs/plus.lua')
-rw-r--r--spec/outputs/plus.lua69
1 files changed, 69 insertions, 0 deletions
diff --git a/spec/outputs/plus.lua b/spec/outputs/plus.lua
new file mode 100644
index 0000000..749e830
--- /dev/null
+++ b/spec/outputs/plus.lua
@@ -0,0 +1,69 @@
1x["do"](x, "work")
2func((function()
3 local _call_0 = a["do"](a)
4 local _call_1 = _call_0["end"](_call_0, "OK")
5 return _call_1["if"](_call_1, "abc", 123)
6end)())
7local _call_0 = b["function"]
8local _call_1 = _call_0["do"](_call_0)
9local _call_2 = _call_1["while"](_call_1, "OK")
10local res = _call_2["if"](_call_2, "def", 998)
11local _call_3 = c["repeat"]["if"]
12local _call_4 = _call_3["then"](_call_3, "xyz")
13_call_4["else"](_call_4, res)
14print(self["for"], self.__class["function"](self.__class, 123))
15do
16 local fcolor = message:match("<%w*>")
17 if fcolor then
18 local message = message:gsub("<%->", fcolor)
19 end
20end
21local message
22do
23 local fcolor = message:match("<%w*>")
24 if fcolor then
25 message = message:gsub("<%->", fcolor)
26 end
27end
28local valA
29do
30 local func = getfunc()
31 if func then
32 valA = func()
33 end
34end
35local valA
36do
37 local func = getfunc()
38 if func then
39 valA = func()
40 end
41end
42local valB
43do
44 local func = getfunc()
45 if func ~= nil then
46 valB = func()
47 end
48end
49backpack = {
50 something = {
51 yeah = 200,
52 they = function()
53 print("hello")
54 return yor_feet("small")
55 end,
56 pretty = hair,
57 gold = hmm
58 },
59 yow = 1000,
60 eat = goo,
61 yeah = dudd
62}
63local start = {
64 something = "cold"
65}
66local bathe
67bathe = {
68 on = "fire"
69}