stage1 使用切片表达字符串而非C字符串 提供属性系统

This commit is contained in:
zzy committed 2026-09-13 22:26:41 +08:00
1 parent a64a96f9a4
commit 72ae6d6994
14 files changed
+685 -1256

No files matched your search

+5 -1
View File
@@ -4,6 +4,8 @@
#include "spl_ast.h"
#include "spl_type.h"
#include "spl_attr.h"
typedef enum {
SPL_SYMBOL_KIND_ERROR,
SPL_SYMBOL_KIND_VAR,
@@ -44,10 +46,12 @@ typedef struct {
spl_symbol_t root;
int error_count;
spl_scope_id_t store_scope;
spl_attr_t *attr;
spl_type_id_t current_fn_ret_tid; // TODO
} spl_sema_t;
void spl_sema_init(spl_sema_t *sema, spl_ast_t *ast, spl_type_t *type, spl_scope_t *scope);
void spl_sema_init(spl_sema_t *sema, spl_ast_t *ast, spl_type_t *type, spl_scope_t *scope,
spl_attr_t *attr);
void spl_sema_drop(spl_sema_t *sema);
void spl_sema_run_module(spl_sema_t *sema, spl_ast_node_ref_t module_ref);