From 7e057d0dd7048d1aa8fbcadb9998902462a384d6 Mon Sep 17 00:00:00 2001 From: Li Jin Date: Mon, 6 Jul 2020 15:36:16 +0800 Subject: fix compile error for "t = { [ [[abc]] ] : 42 }", make "t = {[[abc]]:42}" valid codes. --- spec/inputs/syntax.moon | 2 ++ spec/inputs/tables.moon | 2 ++ 2 files changed, 4 insertions(+) (limited to 'spec/inputs') diff --git a/spec/inputs/syntax.moon b/spec/inputs/syntax.moon index b1a64d3..ccee5f2 100644 --- a/spec/inputs/syntax.moon +++ b/spec/inputs/syntax.moon @@ -68,11 +68,13 @@ something"else" _ = something[[hey]] * 2 _ = something[======[hey]======] * 2 +_ = something[ [======[hey]======] ] * 2 _ = something'else', 2 _ = something"else", 2 _ = something[[else]], 2 +_ = something[ [[else]] ], 2 something 'else', 2 something "else", 2 diff --git a/spec/inputs/tables.moon b/spec/inputs/tables.moon index d7596f5..9383538 100644 --- a/spec/inputs/tables.moon +++ b/spec/inputs/tables.moon @@ -98,7 +98,9 @@ t = { xam = { hello: 1234 "hello": 12354 + [[hello]]: 12354 ["hello"]: 12354 + [ [[hello]] ]: 12354 } -- cgit v1.2.3-55-g6feb