From e958b59c9635f0a01e29e3f30c34adecd327cc1f Mon Sep 17 00:00:00 2001 From: Li Jin Date: Fri, 11 Sep 2020 17:59:53 +0800 Subject: revert binary operator rules, change implicit object start symbol. --- spec/inputs/syntax.moon | 24 ++++++++++++------------ spec/inputs/tables.moon | 13 +++++++------ 2 files changed, 19 insertions(+), 18 deletions(-) (limited to 'spec/inputs') 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 str = --[[ This is a multi line comment. It's OK. -]] strA -- comment 1 - .. strB -- comment 2 +]] strA \ -- comment 1 + .. strB \ -- comment 2 .. strC func --[[port]] 3000, --[[ip]] "192.168.1.1" @@ -322,7 +322,7 @@ v = { a -1 a( -1) - a + a \ - 1 a-1 a - 1 @@ -335,7 +335,7 @@ v = { a ~1 a( ~1) - a + a \ ~ 1 a~1 a ~ 1 @@ -347,26 +347,26 @@ v = { } do - a = 1 - + 2 + a = 1 \ + + 2 \ * 3 / 4 - _1 = f1 -1 - + 2 + _1 = f1 -1 \ + + 2 \ + 3 - _2 = f1 - 1 - + 2 + _2 = f1 - 1 \ + + 2 \ + 3 - f2 = (x)-> print x + f2 = (x)-> print x \ +1 a = f2! -1 |> f2 - a = f2! + a = f2! \ - 1 |> f2 _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 = age: 18 job: "Princess" likes: - # name: "kittens" + * name: "kittens" img: "/image/kittens.png" - # name: "flower" + * name: "flower" img: "/image/flower.png" items: - # name: "ring" + * name: "ring" amount: 2 - # name: "necklace" + * name: "necklace" amount: 1 status: desc: "weak" - # attribute: "health" + * attribute: "health" value: 50 - # attribute: "mana" + * attribute: "mana" value: 100 nil + -- cgit v1.2.3-55-g6feb