fixed "\\" from not parsing

This commit is contained in:
leaf corcoran 2011-09-11 23:36:01 -07:00
parent 87159dc95d
commit 6c391cb572
3 changed files with 12 additions and 2 deletions

View File

@ -212,7 +212,9 @@ local build_grammar = wrap(function()
local Name = sym"@" * Name / mark"self" + Name + Space * "..." / trim
local function simple_string(delim, x)
return C(symx(delim)) * C((P('\\'..delim) + (1 - S('\r\n'..delim)))^0) * sym(delim) / mark"string"
return C(symx(delim)) * C((P('\\'..delim) +
"\\\\" +
(1 - S('\r\n'..delim)))^0) * sym(delim) / mark"string"
end
-- wrap if statement if there is a conditional decorator

View File

@ -27,3 +27,7 @@ hola = [===[
mm = [[well trhere]]
x = "\\"
x = "a\\b"
x = "\\\n"
x = "\""

View File

@ -12,3 +12,7 @@ local hi_there = [[ hi there
local well = [==[ "helo" ]==]
local hola = [===[ eat noots]===]
local mm = [[well trhere]]
local x = "\\"
x = "a\\b"
x = "\\\n"
x = "\""