stage1 修复设计问题 实现ast2ir

This commit is contained in:
zzy
2026-08-05 08:14:23 +08:00
parent 8ac59dfaa1
commit 2ccee5f1cf
14 changed files with 3694 additions and 91 deletions

View File

@@ -1,4 +1,19 @@
#ifndef __SPL_AST2IR_H__
#define __SPL_AST2IR_H__
#include "spl_ir.h"
#include "spl_sema.h"
typedef struct {
const spl_sema_t *sema;
spl_ir_t ir;
VEC(char *) owned_names; /* 本模块 malloc 的函数名drop 时释放 */
int err_count;
} spl_ast2ir_t;
void spl_ast2ir_init(spl_ast2ir_t *ast2ir, const spl_sema_t *sema);
void spl_ast2ir_drop(spl_ast2ir_t *ast2ir);
void spl_ast2ir_run(spl_ast2ir_t *ast2ir);
#endif /* __SPL_AST2IR_H__ */