Software /
code /
prosody
Diff
tools/erlparse.lua @ 5079:2ab99e239d45
tools/erlparse: Fix erlang string escape sequences.
author | Waqas Hussain <waqas20@gmail.com> |
---|---|
date | Sat, 04 Aug 2012 23:23:49 +0500 |
parent | 2947:ff7f6668b34f |
child | 5080:52767b1f057b |
line wrap: on
line diff
--- a/tools/erlparse.lua Sat Aug 04 23:22:16 2012 +0500 +++ b/tools/erlparse.lua Sat Aug 04 23:23:49 2012 +0500 @@ -51,7 +51,7 @@ return ch <= _space; end -local escapes = {["\\b"]="\b", ["\\d"]="\d", ["\\e"]="\e", ["\\f"]="\f", ["\\n"]="\n", ["\\r"]="\r", ["\\s"]="\s", ["\\t"]="\t", ["\\v"]="\v", ["\\\""]="\"", ["\\'"]="'", ["\\\\"]="\\"}; +local escapes = {["\\b"]="\b", ["\\d"]="\127", ["\\e"]="\27", ["\\f"]="\f", ["\\n"]="\n", ["\\r"]="\r", ["\\s"]=" ", ["\\t"]="\t", ["\\v"]="\v", ["\\\""]="\"", ["\\'"]="'", ["\\\\"]="\\"}; local function readString() read("\""); -- skip quote local slash = nil;