stage0 重命名 stage1 ast重新整理
This commit is contained in:
@@ -9,7 +9,7 @@
|
||||
/* clang-format off */
|
||||
#define SPL_AST_KIND_TABLE \
|
||||
X(SPL_AST_NONE, V0, none) \
|
||||
X(SPL_AST_CONTAINER_ITEM, V0, container_item) \
|
||||
X(SPL_AST_CONTAINER_MEMBERS, V0, container_members) \
|
||||
X(SPL_AST_FN_DECL, V0, fn_decl) \
|
||||
X(SPL_AST_FN_DEFINE, V0, fn_define) \
|
||||
X(SPL_AST_TYPE_DECL, V0, type_decl) \
|
||||
@@ -97,6 +97,7 @@
|
||||
X(SPL_AST_TYPE_SLICE, V0, type_slice) \
|
||||
X(SPL_AST_TYPE_STRUCT, V0, type_struct) \
|
||||
X(SPL_AST_TYPE_UNION, V0, type_union) \
|
||||
X(SPL_AST_TYPE_SHAPE, V0, type_shape) \
|
||||
X(SPL_AST_TYPE_ENUM, V0, type_enum) \
|
||||
X(SPL_AST_TYPE_VOID, V0, type_void) \
|
||||
X(SPL_AST_TYPE_BOOL, V0, type_bool) \
|
||||
@@ -140,10 +141,7 @@ struct spl_ast_node {
|
||||
|
||||
usize resolved_def_id;
|
||||
union {
|
||||
struct {
|
||||
spl_ast_node_ref_vec_t attr_list; /* attr_item */
|
||||
spl_ast_node_ref_vec_t members; /* container_decl 列表 */
|
||||
} container_item;
|
||||
spl_ast_node_ref_vec_t container_members; /* container_decl */
|
||||
|
||||
struct {
|
||||
const char *ident;
|
||||
@@ -314,6 +312,8 @@ typedef struct {
|
||||
void spl_ast_init(spl_ast_t *ast, const spl_tok_vec_t *tok_vec /*move*/);
|
||||
void spl_ast_drop(spl_ast_t *ast);
|
||||
|
||||
spl_ast_node_t* spl_ast_node(spl_ast_t *ast, spl_ast_node_ref_t node);
|
||||
|
||||
void spl_ast_prase(spl_ast_t *ast);
|
||||
void spl_ast_valid(spl_ast_t *ast);
|
||||
void spl_ast_dump(spl_ast_t *ast, spl_ast_node_ref_t node);
|
||||
|
||||
Reference in New Issue
Block a user