From: cassowarii Date: Sun, 28 Jun 2026 01:21:34 +0000 (-0700) Subject: actually the <~( ... ) should work like this X-Git-Url: https://git.cassowary.me/gitweb.cgi?a=commitdiff_plain;h=f5e03eb21a8304305322813c64e2a69489bb32bf;p=sarabande.git actually the <~( ... ) should work like this --- diff --git a/src/parse/lexer.c b/src/parse/lexer.c index 80f3085..f679acd 100644 --- a/src/parse/lexer.c +++ b/src/parse/lexer.c @@ -447,8 +447,11 @@ static void compute_next_token(hLexer lx) { } if (token.type == T_BACKSQUIGARROW) { - /* <~ always gets a ( after it to include its parameters. we don't care about a space here. */ - if (input_peek_ahead(lx, space_offset).type != T_LPAREN) { + /* <~ always gets a ( after it to include its parameters, unless there's a ( immediately + * after it with no space. (*with* a space, we accept stuff like a <~ (b), c, d which + * seems likely to be more common than things like a <~(b, c, d) which is kinda wonky + * to begin with (probably people should just write (a <~ b, c, d) but idk) */ + if (input_peek_ahead(lx, 0).type != T_LPAREN) { enqueue_output_token(lx, invisible_lparen); } } else if (lx->last_token_seen.type == T_DOT && token.type == T_IDENTIFIER) {