Avoid spurious parse error if there's trailing space after the end of an expression.

This commit is contained in:
Dianne Skoll
2025-11-01 19:58:46 -04:00
parent d1b55bae8d
commit 878a5d9bed

View File

@@ -2761,6 +2761,9 @@ expr_node *parse_expression(char const **e, int *r, Var *locals)
}
orig = o2;
}
while (**e && isempty(**e)) {
(*e)++;
}
if (**e && (**e != ']')) {
if (DebugFlag & DB_PARSE_EXPR) {
fprintf(ErrFp, " Unparsed: %s\n", *e);