mirror of
https://github.com/leafo/moonscript.git
synced 2024-11-22 02:44:23 +00:00
rebuild, specs for new string precedence
This commit is contained in:
parent
f273598e37
commit
36528f1dd0
@ -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"),
|
Slice = symx("[") * (SliceValue + Cc(1)) * sym(",") * (SliceValue + Cc("")) * (sym(",") * SliceValue) ^ -1 * sym("]") / mark("slice"),
|
||||||
ColonCall = symx("\\") * (_Name * Invoke) / mark("colon"),
|
ColonCall = symx("\\") * (_Name * Invoke) / mark("colon"),
|
||||||
ColonSuffix = symx("\\") * _Name / mark("colon_stub"),
|
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),
|
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"),
|
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,
|
TableValueList = TableValue * (sym(",") * TableValue) ^ 0,
|
||||||
|
@ -66,6 +66,9 @@ something 'else', "ya"
|
|||||||
something'else'
|
something'else'
|
||||||
something"else"
|
something"else"
|
||||||
|
|
||||||
|
something[[hey]] * 2
|
||||||
|
something[======[hey]======] * 2
|
||||||
|
|
||||||
here(we)"go"[12123]
|
here(we)"go"[12123]
|
||||||
|
|
||||||
-- this runs
|
-- this runs
|
||||||
|
@ -53,6 +53,8 @@ end)
|
|||||||
something('else', "ya")
|
something('else', "ya")
|
||||||
something('else')
|
something('else')
|
||||||
something("else")
|
something("else")
|
||||||
|
something([[hey]] * 2)
|
||||||
|
something([======[hey]======] * 2)
|
||||||
_ = here(we)("go")[12123]
|
_ = here(we)("go")[12123]
|
||||||
local something = {
|
local something = {
|
||||||
test = 12323,
|
test = 12323,
|
||||||
|
Loading…
Reference in New Issue
Block a user