diff options
| author | Li Jin <dragon-fly@qq.com> | 2021-10-12 10:04:44 +0800 |
|---|---|---|
| committer | Li Jin <dragon-fly@qq.com> | 2021-10-12 10:04:44 +0800 |
| commit | 60a979e224f26117f5be82bfca757a2483cef0fd (patch) | |
| tree | 7c6af44f6dcada1f23979b820ba830251997b161 /spec/outputs/operators.lua | |
| parent | a19b242cbaf53721b20a3163dd06f43e9ef2b487 (diff) | |
| download | yuescript-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.lua | 29 |
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 @@ | |||
| 1 | local x = 1 + 3 | ||
| 2 | local y = 1 + 3 | ||
| 3 | local z = 1 + 3 + 4 | ||
| 4 | local k = b and c and g | ||
| 5 | local h = thing and function() | ||
| 6 | return print("hello world") | ||
| 7 | end | ||
| 8 | local i = thing or function() | ||
| 9 | return print("hello world") | ||
| 10 | end | ||
| 11 | local p = thing and function() end | ||
| 12 | print("hello world") | ||
| 13 | local s = thing or function() end and 234 | ||
| 14 | local u = { | ||
| 15 | color = 1 and 2 and 3, | ||
| 16 | 4, | ||
| 17 | 4 | ||
| 18 | } | ||
| 19 | local v = { | ||
| 20 | color = 1 and function() | ||
| 21 | return "yeah" | ||
| 22 | end, | ||
| 23 | "great", | ||
| 24 | oksy = 3 ^ 2 | ||
| 25 | } | ||
| 26 | local nno = (yeah + 2) | ||
| 27 | local nn = (yeah + 2) | ||
| 28 | local n = hello(b)(function() end) | ||
| 29 | return hello(a, (yeah + 2) - okay) | ||
