fix regression from #200

This commit is contained in:
leaf corcoran 2015-09-29 00:32:46 -07:00
parent ce396acb15
commit c24acf490b
5 changed files with 18 additions and 3 deletions

View File

@ -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 + LuaString / wrap_func_arg,
Invoke = FnArgs / mark("call") + SingleString / wrap_func_arg + DoubleString / wrap_func_arg + #P("[") * 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,

View File

@ -261,7 +261,7 @@ build_grammar = wrap_env debug_grammar, (root) ->
Invoke: FnArgs/mark"call" +
SingleString / wrap_func_arg +
DoubleString / wrap_func_arg +
LuaString / wrap_func_arg
#P"[" * LuaString / wrap_func_arg
TableValue: KeyValue + Ct(Exp)

View File

@ -109,7 +109,7 @@ format_single_assign = (lhs, assign) ->
-- a symbol
sym = (chars) -> Space * chars
-- a symbole that doesn't accept whitespace before it
-- a symbol that doesn't accept whitespace before it
symx = (chars) -> chars
-- a constructor for quote delimited strings

View File

@ -69,6 +69,15 @@ something"else"
something[[hey]] * 2
something[======[hey]======] * 2
something'else', 2
something"else", 2
something[[else]], 2
something 'else', 2
something "else", 2
something [[else]], 2
here(we)"go"[12123]
-- this runs

View File

@ -55,6 +55,12 @@ something('else')
something("else")
_ = something([[hey]]) * 2
_ = something([======[hey]======]) * 2
_ = something('else'), 2
_ = something("else"), 2
_ = something([[else]]), 2
something('else', 2)
something("else", 2)
something([[else]], 2)
_ = here(we)("go")[12123]
local something = {
test = 12323,