aboutsummaryrefslogtreecommitdiffhomepage
path: root/main.c
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2025-05-04 14:16:49 +0900
committernsfisis <nsfisis@gmail.com>2025-05-04 14:16:49 +0900
commit1cfd20bbd29c88284aa6c2fa48c04588ae1c9b78 (patch)
treec6ee37b6d753a46f1595df1ad313a70ac39e4c18 /main.c
parent341479280d6fd8253b6561817e2b5a91d268c427 (diff)
downloadP4Dcc-1cfd20bbd29c88284aa6c2fa48c04588ae1c9b78.tar.gz
P4Dcc-1cfd20bbd29c88284aa6c2fa48c04588ae1c9b78.tar.zst
P4Dcc-1cfd20bbd29c88284aa6c2fa48c04588ae1c9b78.zip
fix an issue where parse_param returns nothing
Diffstat (limited to 'main.c')
-rw-r--r--main.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/main.c b/main.c
index 13bd3ac..7a16e57 100644
--- a/main.c
+++ b/main.c
@@ -737,6 +737,7 @@ AST* parse_param(PARSER* p) {
AST* param = ast_new(AST_PARAM);
param->var_ty = type_new(TY_INT);
param->name = name;
+ return param;
} else {
fatal_error("parse_param: expect type");
}