refactor(irgen): 规范采用visitor生成

This commit is contained in:
jing
2026-03-18 02:07:34 +08:00
parent 7d4d60c546
commit dfa71bc0d7
8 changed files with 297 additions and 130 deletions

View File

@@ -10,6 +10,6 @@ std::unique_ptr<ir::Module> GenerateIR(SysYParser::CompUnitContext& tree,
const SemanticContext& sema) {
auto module = std::make_unique<ir::Module>();
IRGenImpl gen(*module, sema);
gen.Gen(tree);
tree.accept(&gen);
return module;
}