aboutsummaryrefslogtreecommitdiff
path: root/bp.c
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2021-09-23 13:38:20 -0700
committerBruce Hill <bruce@bruce-hill.com>2021-09-23 13:38:20 -0700
commitcf99abb852536867169168d2c7fabf158099dfd9 (patch)
treebf0f33da9f5ec02d9297e52ba83146edda9d9610 /bp.c
parent55ff8ec6637d90d50ed83c43f83e25fe4571f6bb (diff)
WIP implementation of setjmp/longjmp recovery
Diffstat (limited to 'bp.c')
-rw-r--r--bp.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/bp.c b/bp.c
index 08cde5c..078afff 100644
--- a/bp.c
+++ b/bp.c
@@ -463,6 +463,8 @@ int main(int argc, char *argv[])
file_t *arg_file = spoof_file(&loaded_files, "<pattern argument>", flag, -1);
pat_t *p = bp_pattern(arg_file, arg_file->start);
if (!p) file_err(arg_file, arg_file->start, arg_file->end, "Failed to compile this part of the argument");
+ if (p->type == BP_ERROR)
+ file_err(arg_file, p->args.error.start, p->args.error.end, p->args.error.msg);
if (after_spaces(p->end, true) < arg_file->end) file_err(arg_file, p->end, arg_file->end, "Failed to compile this part of the argument");
pattern = chain_together(arg_file, pattern, p);
} else if (FLAG("-w") || FLAG("--word")) {