aboutsummaryrefslogtreecommitdiff
path: root/spec/outputs/operators.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/operators.lua
parenta19b242cbaf53721b20a3163dd06f43e9ef2b487 (diff)
downloadyuescript-60a979e224f26117f5be82bfca757a2483cef0fd.tar.gz
yuescript-60a979e224f26117f5be82bfca757a2483cef0fd.tar.bz2
yuescript-60a979e224f26117f5be82bfca757a2483cef0fd.zip
fix test.
Diffstat (limited to 'spec/outputs/operators.lua')
-rw-r--r--spec/outputs/operators.lua29
1 files changed, 29 insertions, 0 deletions
diff --git a/spec/outputs/operators.lua b/spec/outputs/operators.lua
new file mode 100644
index 0000000..d782f5c
--- /dev/null
+++ b/spec/outputs/operators.lua
@@ -0,0 +1,29 @@
1local x = 1 + 3
2local y = 1 + 3
3local z = 1 + 3 + 4
4local k = b and c and g
5local h = thing and function()
6 return print("hello world")
7end
8local i = thing or function()
9 return print("hello world")
10end
11local p = thing and function() end
12print("hello world")
13local s = thing or function() end and 234
14local u = {
15 color = 1 and 2 and 3,
16 4,
17 4
18}
19local v = {
20 color = 1 and function()
21 return "yeah"
22 end,
23 "great",
24 oksy = 3 ^ 2
25}
26local nno = (yeah + 2)
27local nn = (yeah + 2)
28local n = hello(b)(function() end)
29return hello(a, (yeah + 2) - okay)