From 3ce0bcf1401d02b5bb6567e524f368db4bb6587d Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Sun, 8 Nov 2020 17:13:54 +0100 Subject: [PATCH] pratt: eval: report errors when parsing nul --- src/eval.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/eval.c b/src/eval.c index e3439f7..21a43aa 100644 --- a/src/eval.c +++ b/src/eval.c @@ -179,7 +179,8 @@ static bool parse_until(const char **input, int *res, int prio) { nul_f *nul_func = ops[tok.kind].nul_func; if (!nul_func) return false; // Error: not a prefix operator - nul_func(input, res, prio); + if (!nul_func(input, res, prio)) + return false; // Error: could not parse right-hand-side } // Do left-loop