From a7c9c3407582f0d8d66539cf90e86fe3100787c5 Mon Sep 17 00:00:00 2001 From: nsfisis Date: Sat, 13 Sep 2025 13:17:28 +0900 Subject: feat: implement cast expression --- src/parse.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/parse.c') diff --git a/src/parse.c b/src/parse.c index b6fa043..b65a6b3 100644 --- a/src/parse.c +++ b/src/parse.c @@ -577,8 +577,7 @@ static AstNode* parse_cast_expr(Parser* p) { // TODO: check whether the original type can be casted to the result type. AstNode* e = parse_cast_expr(p); - e->ty = ty; - return e; + return ast_new_cast_expr(e, ty); } return parse_prefix_expr(p); } -- cgit v1.2.3-70-g09d2