pratt: eval: report errors when parsing nul

This commit is contained in:
Bruno BELANYI 2020-11-08 17:13:54 +01:00
parent 6bd4b698f0
commit 3ce0bcf140

View file

@ -179,7 +179,8 @@ static bool parse_until(const char **input, int *res, int prio) {
nul_f *nul_func = ops[tok.kind].nul_func; nul_f *nul_func = ops[tok.kind].nul_func;
if (!nul_func) if (!nul_func)
return false; // Error: not a prefix operator 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 // Do left-loop