fix(builtin/util): bug incorrect encoding of \t and \n in regular expression, and missing local
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
This commit is contained in:
parent
915644f3b3
commit
29fec3fecc
1 changed files with 3 additions and 3 deletions
|
@ -6,9 +6,9 @@
|
||||||
-- We can use ';', ' ', ',', tabs ad line breaks for separating the constant names
|
-- We can use ';', ' ', ',', tabs ad line breaks for separating the constant names
|
||||||
-- local a, b, c = Consts("a b c")
|
-- local a, b, c = Consts("a b c")
|
||||||
function Consts(s)
|
function Consts(s)
|
||||||
r = {}
|
local r = {}
|
||||||
i = 1
|
local i = 1
|
||||||
for c in string.gmatch(s, '[^ ,;\\t\\n]+') do
|
for c in string.gmatch(s, '[^ ,;\t\n]+') do
|
||||||
r[i] = Const(c)
|
r[i] = Const(c)
|
||||||
i = i + 1
|
i = i + 1
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue