From 36528f1dd019f945269caef0722108ede2f196d6 Mon Sep 17 00:00:00 2001 From: leaf corcoran Date: Sat, 26 Sep 2015 20:59:33 -0700 Subject: [PATCH] rebuild, specs for new string precedence --- moonscript/parse.lua | 2 +- spec/inputs/syntax.moon | 3 +++ spec/outputs/syntax.lua | 2 ++ 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/moonscript/parse.lua b/moonscript/parse.lua index 1ec4f11..d3d8c22 100644 --- a/moonscript/parse.lua +++ b/moonscript/parse.lua @@ -171,7 +171,7 @@ local build_grammar = wrap_env(debug_grammar, function(root) Slice = symx("[") * (SliceValue + Cc(1)) * sym(",") * (SliceValue + Cc("")) * (sym(",") * SliceValue) ^ -1 * sym("]") / mark("slice"), ColonCall = symx("\\") * (_Name * Invoke) / mark("colon"), ColonSuffix = symx("\\") * _Name / mark("colon_stub"), - Invoke = FnArgs / mark("call") + SingleString / wrap_func_arg + DoubleString / wrap_func_arg, + Invoke = FnArgs / mark("call") + SingleString / wrap_func_arg + DoubleString / wrap_func_arg + LuaString / wrap_func_arg, TableValue = KeyValue + Ct(Exp), TableLit = sym("{") * Ct(TableValueList ^ -1 * sym(",") ^ -1 * (SpaceBreak * TableLitLine * (sym(",") ^ -1 * SpaceBreak * TableLitLine) ^ 0 * sym(",") ^ -1) ^ -1) * White * sym("}") / mark("table"), TableValueList = TableValue * (sym(",") * TableValue) ^ 0, diff --git a/spec/inputs/syntax.moon b/spec/inputs/syntax.moon index 09a5dab..a1829a5 100644 --- a/spec/inputs/syntax.moon +++ b/spec/inputs/syntax.moon @@ -66,6 +66,9 @@ something 'else', "ya" something'else' something"else" +something[[hey]] * 2 +something[======[hey]======] * 2 + here(we)"go"[12123] -- this runs diff --git a/spec/outputs/syntax.lua b/spec/outputs/syntax.lua index 72d3dab..2ad418d 100644 --- a/spec/outputs/syntax.lua +++ b/spec/outputs/syntax.lua @@ -53,6 +53,8 @@ end) something('else', "ya") something('else') something("else") +something([[hey]] * 2) +something([======[hey]======] * 2) _ = here(we)("go")[12123] local something = { test = 12323,