summaryrefslogtreecommitdiff
path: root/ir.h
diff options
context:
space:
mode:
Diffstat (limited to 'ir.h')
-rw-r--r--ir.h4
1 files changed, 3 insertions, 1 deletions
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")\