diff options
author | Li Jin <dragon-fly@qq.com> | 2020-09-11 17:59:53 +0800 |
---|---|---|
committer | Li Jin <dragon-fly@qq.com> | 2020-09-11 17:59:53 +0800 |
commit | e958b59c9635f0a01e29e3f30c34adecd327cc1f (patch) | |
tree | 000d56180b091bf9e14444935fbee0b0a28867cf /spec/inputs | |
parent | 85b9ec82247f6e06b802188af35d09d3159625df (diff) | |
download | yuescript-e958b59c9635f0a01e29e3f30c34adecd327cc1f.tar.gz yuescript-e958b59c9635f0a01e29e3f30c34adecd327cc1f.tar.bz2 yuescript-e958b59c9635f0a01e29e3f30c34adecd327cc1f.zip |
revert binary operator rules, change implicit object start symbol.
Diffstat (limited to 'spec/inputs')
-rw-r--r-- | spec/inputs/syntax.moon | 24 | ||||
-rw-r--r-- | spec/inputs/tables.moon | 13 |
2 files changed, 19 insertions, 18 deletions
diff --git a/spec/inputs/syntax.moon b/spec/inputs/syntax.moon index 4435a1e..99daac5 100644 --- a/spec/inputs/syntax.moon +++ b/spec/inputs/syntax.moon | |||
@@ -284,8 +284,8 @@ z = a- b | |||
284 | str = --[[ | 284 | str = --[[ |
285 | This is a multi line comment. | 285 | This is a multi line comment. |
286 | It's OK. | 286 | It's OK. |
287 | ]] strA -- comment 1 | 287 | ]] strA \ -- comment 1 |
288 | .. strB -- comment 2 | 288 | .. strB \ -- comment 2 |
289 | .. strC | 289 | .. strC |
290 | 290 | ||
291 | func --[[port]] 3000, --[[ip]] "192.168.1.1" | 291 | func --[[port]] 3000, --[[ip]] "192.168.1.1" |
@@ -322,7 +322,7 @@ v = { | |||
322 | a -1 | 322 | a -1 |
323 | a( | 323 | a( |
324 | -1) | 324 | -1) |
325 | a | 325 | a \ |
326 | - 1 | 326 | - 1 |
327 | a-1 | 327 | a-1 |
328 | a - 1 | 328 | a - 1 |
@@ -335,7 +335,7 @@ v = { | |||
335 | a ~1 | 335 | a ~1 |
336 | a( | 336 | a( |
337 | ~1) | 337 | ~1) |
338 | a | 338 | a \ |
339 | ~ 1 | 339 | ~ 1 |
340 | a~1 | 340 | a~1 |
341 | a ~ 1 | 341 | a ~ 1 |
@@ -347,26 +347,26 @@ v = { | |||
347 | } | 347 | } |
348 | 348 | ||
349 | do | 349 | do |
350 | a = 1 | 350 | a = 1 \ |
351 | + 2 | 351 | + 2 \ |
352 | * 3 / | 352 | * 3 / |
353 | 4 | 353 | 4 |
354 | 354 | ||
355 | _1 = f1 -1 | 355 | _1 = f1 -1 \ |
356 | + 2 | 356 | + 2 \ |
357 | + 3 | 357 | + 3 |
358 | 358 | ||
359 | _2 = f1 - 1 | 359 | _2 = f1 - 1 \ |
360 | + 2 | 360 | + 2 \ |
361 | + 3 | 361 | + 3 |
362 | 362 | ||
363 | f2 = (x)-> print x | 363 | f2 = (x)-> print x \ |
364 | +1 | 364 | +1 |
365 | 365 | ||
366 | a = f2! | 366 | a = f2! |
367 | -1 |> f2 | 367 | -1 |> f2 |
368 | 368 | ||
369 | a = f2! | 369 | a = f2! \ |
370 | - 1 |> f2 | 370 | - 1 |> f2 |
371 | 371 | ||
372 | _1 \ | 372 | _1 \ |
diff --git a/spec/inputs/tables.moon b/spec/inputs/tables.moon index a1e861b..079be35 100644 --- a/spec/inputs/tables.moon +++ b/spec/inputs/tables.moon | |||
@@ -164,20 +164,21 @@ heroine = | |||
164 | age: 18 | 164 | age: 18 |
165 | job: "Princess" | 165 | job: "Princess" |
166 | likes: | 166 | likes: |
167 | # name: "kittens" | 167 | * name: "kittens" |
168 | img: "/image/kittens.png" | 168 | img: "/image/kittens.png" |
169 | # name: "flower" | 169 | * name: "flower" |
170 | img: "/image/flower.png" | 170 | img: "/image/flower.png" |
171 | items: | 171 | items: |
172 | # name: "ring" | 172 | * name: "ring" |
173 | amount: 2 | 173 | amount: 2 |
174 | # name: "necklace" | 174 | * name: "necklace" |
175 | amount: 1 | 175 | amount: 1 |
176 | status: | 176 | status: |
177 | desc: "weak" | 177 | desc: "weak" |
178 | # attribute: "health" | 178 | * attribute: "health" |
179 | value: 50 | 179 | value: 50 |
180 | # attribute: "mana" | 180 | * attribute: "mana" |
181 | value: 100 | 181 | value: 100 |
182 | 182 | ||
183 | nil | 183 | nil |
184 | |||