From e9b36ae07e6d1ccc7c74f5c45733439057058d11 Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Tue, 26 Nov 2024 13:48:00 -0500 Subject: More permissive parsing for spaces between binops --- parse.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'parse.c') diff --git a/parse.c b/parse.c index 33a5b312..407710bb 100644 --- a/parse.c +++ b/parse.c @@ -1769,8 +1769,8 @@ static ast_t *parse_infix_expr(parse_ctx_t *ctx, const char *pos, int min_tightn } whitespace(&pos); - if (get_line_number(ctx->file, pos) != starting_line && get_indent(ctx, pos) <= starting_indent) - parser_err(ctx, pos, strchrnul(pos, '\n'), "I expected this line to be more indented than the line above it"); + if (get_line_number(ctx->file, pos) != starting_line && get_indent(ctx, pos) < starting_indent) + parser_err(ctx, pos, strchrnul(pos, '\n'), "I expected this line to be at least as indented than the line above it"); ast_t *rhs = parse_infix_expr(ctx, pos, op_tightness[op] + 1); if (!rhs) break; -- cgit v1.2.3