pratt: eval: report errors when parsing nul
This commit is contained in:
parent
6bd4b698f0
commit
3ce0bcf140
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue