From d4c768a481b923d407201c25d3d750040b6ccd44 Mon Sep 17 00:00:00 2001 From: WormHeamer Date: Sun, 10 Aug 2025 02:46:50 -0400 Subject: add type-specifiers to let, N_UNINIT for uninitialized values --- ir.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'ir.h') diff --git a/ir.h b/ir.h index ca3e8b4..0ae71c8 100644 --- a/ir.h +++ b/ir.h @@ -43,9 +43,10 @@ struct Node; int type_eql(Type *a, Type *b); int type_base_eql(Type *a, Type *b); int value_eql(Value *a, Value *b); -int type_check(struct Node *n); +void type_check(struct Node *n, Lexer *l); Str type_desc(Type *t, Arena *arena); void type_err(struct Node *n, Lexer *l); +void type_expected(Type *want, struct Node *n, Lexer *l); /* nodes */ @@ -61,6 +62,7 @@ void type_err(struct Node *n, Lexer *l); X(RETURN, "return")\ X(KEEPALIVE, "keepalive")\ X(LIT, "literal")\ + X(UNINIT, "uninitialized value")\ X(OP_ADD, "add")\ X(OP_SUB, "sub")\ X(OP_MUL, "mul")\ -- cgit v1.2.3