From 61531e58066e4d803624ab2c6dac84445fb75e59 Mon Sep 17 00:00:00 2001 From: Carson Fleming Date: Thu, 30 Jul 2026 00:20:30 -0400 Subject: casting --- ast.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'ast.h') diff --git a/ast.h b/ast.h index e77c779..8611aaa 100644 --- a/ast.h +++ b/ast.h @@ -78,6 +78,11 @@ struct paren_node { struct expr_list_node* expr_list; }; +struct cast_node { + struct type type; + struct expr_node* expr; +}; + struct expr_node { enum { EXPR_INT_LIT, @@ -90,6 +95,7 @@ struct expr_node { EXPR_UNARY, EXPR_BINARY, EXPR_PAREN, + EXPR_CAST, } type; union { struct int_lit_node int_lit; @@ -102,6 +108,7 @@ struct expr_node { struct unary_node unary; struct binary_node binary; struct paren_node paren; + struct cast_node cast; } inner; const struct type* resolved_type; -- cgit v1.2.3