feat: 泛型基础设施 — <T>解析 + 类型推断 (单态化 codegen 待补)
This commit is contained in:
+4
-1
@@ -31,13 +31,16 @@ AstNode* ast_make_program(void* alloc, AstNode** fns, size_t fn_count,
|
||||
|
||||
AstNode* ast_make_function(void* alloc, const char* name, AstNode** params, size_t pcount,
|
||||
TypeKind ret, const char* ret_struct_name, AstNode* body,
|
||||
bool is_pub, SourceLoc loc) {
|
||||
bool is_pub, const char** type_params, size_t tp_count,
|
||||
SourceLoc loc) {
|
||||
NEW(alloc, AST_FUNCTION);
|
||||
n->as.function.name = name; n->as.function.params = params;
|
||||
n->as.function.param_count = pcount; n->as.function.return_type = ret;
|
||||
n->as.function.return_struct_type_name = ret_struct_name;
|
||||
n->as.function.body = body;
|
||||
n->as.function.is_pub = is_pub;
|
||||
n->as.function.type_params = type_params;
|
||||
n->as.function.type_param_count = tp_count;
|
||||
return n;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user