aboutsummaryrefslogtreecommitdiff
path: root/core/errors.nom
diff options
context:
space:
mode:
authorBruce Hill <bitbucket@bruce-hill.com>2018-09-16 17:38:19 -0700
committerBruce Hill <bitbucket@bruce-hill.com>2018-09-16 17:38:51 -0700
commitf225a48367ca7b3e188bd34377f730370851e804 (patch)
tree590086751802815906fcb9c9aa416359880aa6e7 /core/errors.nom
parent96e5e567cb208194793a56462b90fb02c9cfe927 (diff)
Much better error reporting for compile errors (i.e. not parse errors),
using the pretty_error system.
Diffstat (limited to 'core/errors.nom')
-rw-r--r--core/errors.nom6
1 files changed, 4 insertions, 2 deletions
diff --git a/core/errors.nom b/core/errors.nom
index f5dcb8c..1157cb1 100644
--- a/core/errors.nom
+++ b/core/errors.nom
@@ -6,8 +6,10 @@ use "core/metaprogramming.nom"
compile [barf] to (Lua "error(nil, 0);")
compile [barf %msg] to (Lua "error(\(%msg as lua expr), 0);")
-compile [compile error at %source %msg] to (..)
- Lua "nomsu:compile_error(\(%source as lua expr), \(%msg as lua expr))"
+compile [compile error at %tree %msg] to (..)
+ Lua "nomsu:compile_error(\(%tree as lua expr), \(%msg as lua expr))"
+compile [compile error at %tree %msg hint %hint] to (..)
+ Lua "nomsu:compile_error(\(%tree as lua expr), \(%msg as lua expr), \(%hint as lua expr))"
compile [assume %condition] to:
lua> "\