From f5e03eb21a8304305322813c64e2a69489bb32bf Mon Sep 17 00:00:00 2001 From: cassowarii Date: Sat, 27 Jun 2026 18:21:34 -0700 Subject: [PATCH] actually the <~( ... ) should work like this --- src/parse/lexer.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) 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) { -- 1.8.3.1