aboutsummaryrefslogtreecommitdiff
path: root/parser.lua
diff options
context:
space:
mode:
Diffstat (limited to 'parser.lua')
-rw-r--r--parser.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/parser.lua b/parser.lua
index 2ae4aee..4016e9b 100644
--- a/parser.lua
+++ b/parser.lua
@@ -96,7 +96,7 @@ make_parser = function(peg, make_tree)
file = input
}
local tree = peg:match(input, nil, userdata)
- if not tree then
+ if not tree or type(tree) == 'number' then
error("File " .. tostring(filename) .. " failed to parse:\n" .. tostring(input))
end
return tree