diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2025-09-20 14:07:26 -0400 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2025-09-20 14:26:08 -0400 |
| commit | b9a8ddea2c0b5f170e461b9216eb14f2d86588eb (patch) | |
| tree | cb45901e3046b3d28823df9c85a719a38981804d /src/parse/functions.c | |
| parent | e937e3056b934c6d426abc3db8de1c99433a434b (diff) | |
WIP on inline enums
Diffstat (limited to 'src/parse/functions.c')
| -rw-r--r-- | src/parse/functions.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/parse/functions.c b/src/parse/functions.c index ceb0a8bc..ea20e385 100644 --- a/src/parse/functions.c +++ b/src/parse/functions.c @@ -47,15 +47,14 @@ arg_ast_t *parse_args(parse_ctx_t *ctx, const char **pos) { } if (match(pos, ":")) { - type = expect(ctx, *pos - 1, pos, parse_type, "I expected a type here"); + type = expect(ctx, *pos, pos, parse_type, "I expected a type here"); whitespace(ctx, pos); - if (match(pos, "=")) - default_val = expect(ctx, *pos - 1, pos, parse_term, "I expected a value after this '='"); + if (match(pos, "=")) default_val = expect(ctx, *pos, pos, parse_term, "I expected a value here"); names = new (name_list_t, .start = name_start, .end = *pos, .name = name, .alias = alias, .next = names); break; } else if (strncmp(*pos, "==", 2) != 0 && match(pos, "=")) { - default_val = expect(ctx, *pos - 1, pos, parse_term, "I expected a value after this '='"); + default_val = expect(ctx, *pos, pos, parse_term, "I expected a value here"); names = new (name_list_t, .start = name_start, .end = *pos, .name = name, .alias = alias, .next = names); break; |
