diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2024-11-26 13:48:00 -0500 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2024-11-26 13:48:00 -0500 |
| commit | e9b36ae07e6d1ccc7c74f5c45733439057058d11 (patch) | |
| tree | 9d897b3755af9708bf2d2827e6afb63f651fe73f /parse.c | |
| parent | ac82e128aa4febfab75b16bdb27571a9ea881c10 (diff) | |
More permissive parsing for spaces between binops
Diffstat (limited to 'parse.c')
| -rw-r--r-- | parse.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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; |
