From ff9118a9bdd1d4384bef1829ed640aed371b7fc3 Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Tue, 29 Apr 2025 23:44:49 -0400 Subject: Improved error message --- src/parse.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') 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; -- cgit v1.2.3