diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2025-04-29 23:44:49 -0400 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2025-04-29 23:44:49 -0400 |
| commit | ff9118a9bdd1d4384bef1829ed640aed371b7fc3 (patch) | |
| tree | 8481fd7fd2c84c30eb300206c94d7de8e1f1e176 /src/parse.c | |
| parent | fb847893db8cf3ffa9927a3fb172cf91f7c15374 (diff) | |
Improved error message
Diffstat (limited to 'src/parse.c')
| -rw-r--r-- | src/parse.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/parse.c b/src/parse.c index 78d9a2ed..a1b54b73 100644 --- a/src/parse.c +++ b/src/parse.c @@ -568,7 +568,7 @@ type_ast_t *parse_func_type(parse_ctx_t *ctx, const char *pos) { const char *start = pos; if (!match_word(&pos, "func")) return NULL; spaces(&pos); - if (!match(&pos, "(")) return NULL; + expect_str(&pos, "(", "I expected a parenthesis here"); arg_ast_t *args = parse_args(ctx, &pos); spaces(&pos); type_ast_t *ret = match(&pos, "->") ? optional(ctx, &pos, parse_type) : NULL; |
