feat(ast): 添加LVALUE表达式类型支持并重构表达式创建逻辑
- 新增SCC_AST_EXPR_LVALUE表达式类型用于表示右值 - 重构表达式创建逻辑,移除旧的通用创建函数expr_create - 使用新的初始化函数替代原有的表达式创建方式 - 更新AST转储功能以支持LVALUE表达式的输出 - 修改sizeof表达式解析逻辑,修复类型转换处理 - 优化各种表达式类型的解析和初始化过程
This commit is contained in:
@@ -439,7 +439,7 @@ static inline void scc_ast_expr_lvalue_init(scc_ast_expr_t *expr,
|
||||
scc_ast_type_t *type) {
|
||||
Assert(expr != null && type != null);
|
||||
expr->base.loc = scc_pos_create();
|
||||
expr->base.type = SCC_AST_EXPR_IDENTIFIER;
|
||||
expr->base.type = SCC_AST_EXPR_LVALUE;
|
||||
expr->lvalue.type = type;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user