aboutsummaryrefslogtreecommitdiff
path: root/src/parse/statements.c
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2025-09-06 14:46:15 -0400
committerBruce Hill <bruce@bruce-hill.com>2025-09-06 14:46:15 -0400
commitd8a48f64111f542f3afeb5d6e47ff092f9278d9f (patch)
tree07c364503025bb2a26edd7b26f1ba9e8d25340f6 /src/parse/statements.c
parent12345a85d9c7d7a56ddf323247a4bdf347021b73 (diff)
parent73246764f88f6f652316ee0c138a990d836698a7 (diff)
Merge branch 'main' into optional-list-indexing
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;