aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/parse.c
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2025-09-13 22:41:49 +0900
committernsfisis <nsfisis@gmail.com>2025-09-13 22:41:49 +0900
commitaae878752e55be9f05dfbde37122e3726527e532 (patch)
treef18e9be9c5e408f92818d830fc69a59856e7fadd /src/parse.c
parent3619b7e41bc8e5a413016a014c9128fcb8281410 (diff)
downloadducc-aae878752e55be9f05dfbde37122e3726527e532.tar.gz
ducc-aae878752e55be9f05dfbde37122e3726527e532.tar.zst
ducc-aae878752e55be9f05dfbde37122e3726527e532.zip
feat: support cast expression in constant evaluation
Diffstat (limited to 'src/parse.c')
-rw-r--r--src/parse.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/parse.c b/src/parse.c
index c742f88..82c431a 100644
--- a/src/parse.c
+++ b/src/parse.c
@@ -2304,6 +2304,8 @@ static int eval(AstNode* e) {
} else {
return eval(e->node_else);
}
+ } else if (e->kind == AstNodeKind_cast_expr) {
+ return eval(e->node_operand);
} else {
unimplemented();
}