aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/parse.c
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2025-08-30 11:34:50 +0900
committernsfisis <nsfisis@gmail.com>2025-08-30 11:34:50 +0900
commit6488032643944c0ca09a1d33689ccd93ea37f7af (patch)
tree02978bf8dc3be65f215513bb3ab4f62113038e12 /src/parse.c
parent9109277a574a424ff666d27d61156786bc380505 (diff)
downloadducc-6488032643944c0ca09a1d33689ccd93ea37f7af.tar.gz
ducc-6488032643944c0ca09a1d33689ccd93ea37f7af.tar.zst
ducc-6488032643944c0ca09a1d33689ccd93ea37f7af.zip
refactor: define enum StorageClass
Diffstat (limited to 'src/parse.c')
-rw-r--r--src/parse.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/parse.c b/src/parse.c
index fe623a5..bafb156 100644
--- a/src/parse.c
+++ b/src/parse.c
@@ -589,7 +589,9 @@ static Type* parse_type(Parser* p) {
}
ty = type_new_ptr(ty);
}
- ty->is_static = has_static;
+ if (has_static) {
+ ty->storage_class = StorageClass_static;
+ }
return ty;
}
@@ -1265,7 +1267,7 @@ static AstNode* parse_func_decl_or_def(Parser* p) {
func->node_stack_size =
p->lvars.data[p->lvars.len - 1].stack_offset + type_sizeof(p->lvars.data[p->lvars.len - 1].ty);
}
- func->node_function_is_static = ty->is_static;
+ func->node_function_is_static = ty->storage_class == StorageClass_static;
return func;
}