From 1a436b79b2ef64eebde579833519e498543fdbc2 Mon Sep 17 00:00:00 2001 From: leaf corcoran Date: Thu, 6 Jun 2013 16:55:59 -0700 Subject: [PATCH] { a : b } doesn't do self-assign #98 --- moonscript/parse.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/moonscript/parse.lua b/moonscript/parse.lua index a4e36b9..13001bc 100644 --- a/moonscript/parse.lua +++ b/moonscript/parse.lua @@ -575,7 +575,7 @@ local build_grammar = wrap_env(function() op"*" + op"^" + Ct(NameList) * (sym"=" * Ct(ExpListLow))^-1) / mark"export", - KeyValue = (sym":" * Name) / self_assign + Ct((KeyName + sym"[" * Exp * sym"]" + DoubleString + SingleString) * symx":" * (Exp + TableBlock)), + KeyValue = (sym":" * -SomeSpace * Name) / self_assign + Ct((KeyName + sym"[" * Exp * sym"]" + DoubleString + SingleString) * symx":" * (Exp + TableBlock)), KeyValueList = KeyValue * (sym"," * KeyValue)^0, KeyValueLine = CheckIndent * KeyValueList * sym","^-1,