From e472b9a64c9f104a67f0503d46d7da7b28be1fc4 Mon Sep 17 00:00:00 2001 From: Evan Silberman Date: Mon, 11 Nov 2024 12:22:00 -0800 Subject: skip leading -t expression whitespace Seems like there shouldn't be terrible consequences, the parse error without it is hard to understand and took me a while to debug when I was trying to use lr in a shell script like lr -t ' -- nicely-formatted multiline expression goes here ' Message-ID: <2MWMP6HZDV8FW.2JYP28P850115@silby.fyi> --- lr.c | 1 + 1 file changed, 1 insertion(+) diff --git a/lr.c b/lr.c index 17236c5..049b535 100644 --- a/lr.c +++ b/lr.c @@ -914,6 +914,7 @@ static struct expr * parse_expr(const char *s) { pos = (char *)s; + ws(); struct expr *e = parse_cond(); if (*pos) parse_error("trailing garbage at '%.15s'", pos); -- cgit 1.4.1