aboutsummaryrefslogtreecommitdiff
path: root/src/parse/statements.c
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2025-09-06 14:47:45 -0400
committerBruce Hill <bruce@bruce-hill.com>2025-09-06 14:47:45 -0400
commita8316252db95e3d77f9f0e9beb89cfcb4573d5b1 (patch)
treee5905bce9611e35ccb2f84481232fca0e657ff42 /src/parse/statements.c
parenta0ac652cd1eebdc42425b34f1685f8cb20cb4eea (diff)
parent73246764f88f6f652316ee0c138a990d836698a7 (diff)
Merge branch 'main' into simplified-quotes
Diffstat (limited to 'src/parse/statements.c')
-rw-r--r--src/parse/statements.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/parse/statements.c b/src/parse/statements.c
index a30231f0..9606acdc 100644
--- a/src/parse/statements.c
+++ b/src/parse/statements.c
@@ -8,8 +8,8 @@
#include "../stdlib/util.h"
#include "context.h"
#include "errors.h"
-#include "files.h"
#include "expressions.h"
+#include "files.h"
#include "statements.h"
#include "suffixes.h"
#include "types.h"
@@ -46,7 +46,7 @@ ast_t *parse_assignment(parse_ctx_t *ctx, const char *pos) {
targets = new (ast_list_t, .ast = lhs, .next = targets);
spaces(&pos);
if (!match(&pos, ",")) break;
- whitespace(&pos);
+ whitespace(ctx, &pos);
}
if (!targets) return NULL;
@@ -62,7 +62,7 @@ ast_t *parse_assignment(parse_ctx_t *ctx, const char *pos) {
values = new (ast_list_t, .ast = rhs, .next = values);
spaces(&pos);
if (!match(&pos, ",")) break;
- whitespace(&pos);
+ whitespace(ctx, &pos);
}
REVERSE_LIST(targets);
@@ -101,7 +101,7 @@ ast_t *parse_doctest(parse_ctx_t *ctx, const char *pos) {
if (!match(&pos, ">>")) return NULL;
spaces(&pos);
ast_t *expr = expect(ctx, start, &pos, parse_statement, "I couldn't parse the expression for this doctest");
- whitespace(&pos);
+ whitespace(ctx, &pos);
ast_t *expected = NULL;
if (match(&pos, "=")) {
spaces(&pos);
@@ -120,7 +120,7 @@ ast_t *parse_assert(parse_ctx_t *ctx, const char *pos) {
spaces(&pos);
ast_t *message = NULL;
if (match(&pos, ",")) {
- whitespace(&pos);
+ whitespace(ctx, &pos);
message = expect(ctx, start, &pos, parse_extended_expr, "I couldn't parse the error message for this assert");
} else {
pos = expr->end;