aboutsummaryrefslogtreecommitdiff
path: root/spec/inputs/operators.yue
diff options
context:
space:
mode:
authorLi Jin <dragon-fly@qq.com>2021-02-17 11:22:07 +0800
committerLi Jin <dragon-fly@qq.com>2021-02-17 11:22:07 +0800
commit7066392d1c974065181d95d93274136dcd625d43 (patch)
treecf51eafc2c52cbc12246a306bca172d799193d30 /spec/inputs/operators.yue
parent90cd12ad9ef465f3e435e1bd034dcfbe4e19d016 (diff)
downloadyuescript-7066392d1c974065181d95d93274136dcd625d43.tar.gz
yuescript-7066392d1c974065181d95d93274136dcd625d43.tar.bz2
yuescript-7066392d1c974065181d95d93274136dcd625d43.zip
stop reusing variables, rename project.
Diffstat (limited to 'spec/inputs/operators.yue')
-rw-r--r--spec/inputs/operators.yue72
1 files changed, 72 insertions, 0 deletions
diff --git a/spec/inputs/operators.yue b/spec/inputs/operators.yue
new file mode 100644
index 0000000..57e58d6
--- /dev/null
+++ b/spec/inputs/operators.yue
@@ -0,0 +1,72 @@
1
2-- binary ops
3x = 1 + 3
4
5y = 1 +
6 3
7
8z = 1 +
9 3 +
10 4
11
12--
13
14k = b and c and
15 g
16
17
18h = thing and
19 ->
20 print "hello world"
21
22-- TODO: should fail, indent still set to previous line so it thinks body is
23-- indented
24i = thing or
25 ->
26 print "hello world"
27
28p = thing and
29 ->
30print "hello world"
31
32s = thing or
33 -> and 234
34
35
36--
37u = {
38 color: 1 and 2 and
39 3
40 4
41 4
42}
43
44v = {
45 color: 1 and
46 ->
47 "yeah"
48 "great"
49 oksy: 3 ^
502
51}
52
53-- parens
54
55nno = (
56 yeah + 2 )
57
58nn = (
59 yeah + 2
60)
61
62n = hello(
63 b
64) ->
65
66hello a,
67 (
68 yeah +
69 2
70 ) -
71 okay
72