aboutsummaryrefslogtreecommitdiff
path: root/parse.c
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2024-11-26 13:48:00 -0500
committerBruce Hill <bruce@bruce-hill.com>2024-11-26 13:48:00 -0500
commite9b36ae07e6d1ccc7c74f5c45733439057058d11 (patch)
tree9d897b3755af9708bf2d2827e6afb63f651fe73f /parse.c
parentac82e128aa4febfab75b16bdb27571a9ea881c10 (diff)
More permissive parsing for spaces between binops
Diffstat (limited to 'parse.c')
-rw-r--r--parse.c4
1 files changed, 2 insertions, 2 deletions
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;