feat(parser): 添加语义分析回调清理函数并完善资源管理
添加了 scc_sema_drop 函数用于清理语义分析回调结构, 并在主程序中正确初始化和释放语义分析回调, 确保资源得到适当管理。 同时修复了AST转储中的缩进问题,在函数调用括号前添加正确的缩进, 并修正了测试代码中的结构体字段初始化顺序。
This commit is contained in:
@@ -355,7 +355,9 @@ static void dump_type_impl(scc_ast_type_t *type, scc_tree_dump_ctx_t *ctx) {
|
||||
dump_type_impl(param->param.type, ctx);
|
||||
}
|
||||
} else {
|
||||
scc_tree_print_indent(ctx);
|
||||
PRINT_QUOTED_VALUE(ctx, "()");
|
||||
scc_tree_dump_printf(ctx, "\n");
|
||||
}
|
||||
scc_vec_pop(ctx->stack);
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user