Skip to content
Snippets Groups Projects
Commit dc07ffcb authored by Otowa Kotori's avatar Otowa Kotori
Browse files

sanity check for parser

parent 9297654c
No related branches found
No related tags found
1 merge request!628i18n Misc updates
......@@ -321,7 +321,19 @@ local function dofolder(dir)
print(colors("%{bright}-------------------------------------"))
print(colors("%{bright}-- "..file))
print(colors("%{bright}-------------------------------------"))
explore(file:gsub("%.%./", ""), p:parse{file})
local function err(x)
io.stderr:write("In file ".. file .. ":\n")
io.stderr:write(x .. "\n")
end
local function parsefunc()
return p:parse{file}
end
local ok, parsed = xpcall(parsefunc, err)
if ok then
explore(file:gsub("%.%./", ""), parsed)
else
print()
end
end
if lfs.attributes(dir, "mode") == "file" then
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment