diff options
Diffstat (limited to 'spec/inputs/cond.moon')
-rw-r--r-- | spec/inputs/cond.moon | 104 |
1 files changed, 52 insertions, 52 deletions
diff --git a/spec/inputs/cond.moon b/spec/inputs/cond.moon index e8b6283..3dee99b 100644 --- a/spec/inputs/cond.moon +++ b/spec/inputs/cond.moon | |||
@@ -2,24 +2,24 @@ | |||
2 | you_cool = false | 2 | you_cool = false |
3 | 3 | ||
4 | _ = if cool | 4 | _ = if cool |
5 | if you_cool | 5 | if you_cool |
6 | one | 6 | one |
7 | else if eatdic | 7 | else if eatdic |
8 | yeah | 8 | yeah |
9 | else | 9 | else |
10 | _ = two | 10 | _ = two |
11 | three | 11 | three |
12 | else | 12 | else |
13 | no | 13 | no |
14 | 14 | ||
15 | _ = if cool then no | 15 | _ = if cool then no |
16 | _ = if cool then no else yes | 16 | _ = if cool then no else yes |
17 | 17 | ||
18 | if cool then wow cool else | 18 | if cool then wow cool else |
19 | noso cool | 19 | noso cool |
20 | 20 | ||
21 | if working | 21 | if working |
22 | _ = if cool then if cool then okay else what else nah | 22 | _ = if cool then if cool then okay else what else nah |
23 | 23 | ||
24 | 24 | ||
25 | if yeah then no day elseif cool me then okay ya else u way | 25 | if yeah then no day elseif cool me then okay ya else u way |
@@ -29,117 +29,117 @@ if yeah then no dad else if cool you then okay bah else p way | |||
29 | if (->)() then what ever | 29 | if (->)() then what ever |
30 | 30 | ||
31 | if nil then flip me else | 31 | if nil then flip me else |
32 | it be,rad | 32 | it be,rad |
33 | 33 | ||
34 | 34 | ||
35 | if things great then no way elseif okay sure | 35 | if things great then no way elseif okay sure |
36 | what here | 36 | what here |
37 | 37 | ||
38 | 38 | ||
39 | if things then no chance | 39 | if things then no chance |
40 | elseif okay | 40 | elseif okay |
41 | what now | 41 | what now |
42 | 42 | ||
43 | 43 | ||
44 | if things | 44 | if things |
45 | yes man | 45 | yes man |
46 | elseif okay person then hi there else hmm sure | 46 | elseif okay person then hi there else hmm sure |
47 | 47 | ||
48 | if lets go | 48 | if lets go |
49 | print "greetings" | 49 | print "greetings" |
50 | elseif "just us" | 50 | elseif "just us" |
51 | print "will smith" else show 5555555 | 51 | print "will smith" else show 5555555 |
52 | 52 | ||
53 | -- | 53 | -- |
54 | 54 | ||
55 | if something = 10 | 55 | if something = 10 |
56 | print something | 56 | print something |
57 | else | 57 | else |
58 | print "else" | 58 | print "else" |
59 | 59 | ||
60 | hello = if something = 10 | 60 | hello = if something = 10 |
61 | print something | 61 | print something |
62 | else | 62 | else |
63 | print "else" | 63 | print "else" |
64 | 64 | ||
65 | 65 | ||
66 | hello = 5 + if something = 10 | 66 | hello = 5 + if something = 10 |
67 | print something | 67 | print something |
68 | 68 | ||
69 | --- | 69 | --- |
70 | 70 | ||
71 | z = false | 71 | z = false |
72 | 72 | ||
73 | _ = if false | 73 | _ = if false |
74 | one | 74 | one |
75 | elseif x = true | 75 | elseif x = true |
76 | two | 76 | two |
77 | elseif z = true | 77 | elseif z = true |
78 | three | 78 | three |
79 | else | 79 | else |
80 | four | 80 | four |
81 | 81 | ||
82 | 82 | ||
83 | out = if false | 83 | out = if false |
84 | one | 84 | one |
85 | elseif x = true | 85 | elseif x = true |
86 | two | 86 | two |
87 | elseif z = true | 87 | elseif z = true |
88 | three | 88 | three |
89 | else | 89 | else |
90 | four | 90 | four |
91 | 91 | ||
92 | kzy = -> | 92 | kzy = -> |
93 | if something = true | 93 | if something = true |
94 | 1 | 94 | 1 |
95 | elseif another = false | 95 | elseif another = false |
96 | 2 | 96 | 2 |
97 | 97 | ||
98 | --- | 98 | --- |
99 | 99 | ||
100 | unless true | 100 | unless true |
101 | print "cool!" | 101 | print "cool!" |
102 | 102 | ||
103 | unless true and false | 103 | unless true and false |
104 | print "cool!" | 104 | print "cool!" |
105 | 105 | ||
106 | unless false then print "cool!" | 106 | unless false then print "cool!" |
107 | unless false then print "cool!" else print "no way!" | 107 | unless false then print "cool!" else print "no way!" |
108 | 108 | ||
109 | unless nil | 109 | unless nil |
110 | print "hello" | 110 | print "hello" |
111 | else | 111 | else |
112 | print "world" | 112 | print "world" |
113 | 113 | ||
114 | -- | 114 | -- |
115 | 115 | ||
116 | x = unless true | 116 | x = unless true |
117 | print "cool!" | 117 | print "cool!" |
118 | 118 | ||
119 | x = unless true and false | 119 | x = unless true and false |
120 | print "cool!" | 120 | print "cool!" |
121 | 121 | ||
122 | y = unless false then print "cool!" | 122 | y = unless false then print "cool!" |
123 | y = unless false then print "cool!" else print "no way!" | 123 | y = unless false then print "cool!" else print "no way!" |
124 | 124 | ||
125 | z = unless nil | 125 | z = unless nil |
126 | print "hello" | 126 | print "hello" |
127 | else | 127 | else |
128 | print "world" | 128 | print "world" |
129 | 129 | ||
130 | print unless true | 130 | print unless true |
131 | print "cool!" | 131 | print "cool!" |
132 | 132 | ||
133 | print unless true and false | 133 | print unless true and false |
134 | print "cool!" | 134 | print "cool!" |
135 | 135 | ||
136 | print unless false then print "cool!" | 136 | print unless false then print "cool!" |
137 | print unless false then print "cool!" else print "no way!" | 137 | print unless false then print "cool!" else print "no way!" |
138 | 138 | ||
139 | print unless nil | 139 | print unless nil |
140 | print "hello" | 140 | print "hello" |
141 | else | 141 | else |
142 | print "world" | 142 | print "world" |
143 | 143 | ||
144 | -- | 144 | -- |
145 | 145 | ||
@@ -151,9 +151,9 @@ dddd = {1,2,3} unless value | |||
151 | -- | 151 | -- |
152 | 152 | ||
153 | do | 153 | do |
154 | j = 100 | 154 | j = 100 |
155 | unless j = hi! | 155 | unless j = hi! |
156 | error "not j!" | 156 | error "not j!" |
157 | 157 | ||
158 | ---------------- | 158 | ---------------- |
159 | 159 | ||
@@ -165,8 +165,8 @@ a,c,b = "cool" if something | |||
165 | --- | 165 | --- |
166 | 166 | ||
167 | j = if 1 | 167 | j = if 1 |
168 | if 2 | 168 | if 2 |
169 | 3 | 169 | 3 |
170 | else 6 | 170 | else 6 |
171 | 171 | ||
172 | 172 | ||
@@ -174,10 +174,10 @@ m = if 1 | |||
174 | 174 | ||
175 | 175 | ||
176 | 176 | ||
177 | if 2 | 177 | if 2 |
178 | 178 | ||
179 | 179 | ||
180 | 3 | 180 | 3 |
181 | 181 | ||
182 | 182 | ||
183 | else 6 | 183 | else 6 |