aboutsummaryrefslogtreecommitdiff
path: root/parse.c
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2024-10-08 21:46:03 -0400
committerBruce Hill <bruce@bruce-hill.com>2024-10-08 21:46:03 -0400
commit6ae27d409a259f47a317c25adf4e0bab0edbddb4 (patch)
treebaaefc3d6a686b58b814d15150c8d75f832d569a /parse.c
parent839c1983a0dad0232da3ceda9c7c02a49715453c (diff)
Better message
Diffstat (limited to 'parse.c')
-rw-r--r--parse.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/parse.c b/parse.c
index d365fc4b..4001d4b8 100644
--- a/parse.c
+++ b/parse.c
@@ -1005,7 +1005,7 @@ PARSER(parse_reduction) {
ast_t *fallback = NULL;
if (match_word(&pos, "else")) {
- expect_str(ctx, start, &pos, ":", "I expected a ':' here");
+ expect_str(ctx, pos-strlen("else"), &pos, ":", "I expected a ':' for this 'else'");
fallback = expect(ctx, pos-4, &pos, parse_expr, "I couldn't parse the expression after this 'else'");
}