fix(frontend): 修复部分实现
This commit is contained in:
@@ -9,12 +9,12 @@
|
||||
|
||||
std::unique_ptr<ir::Module> GenerateIR(antlr4::tree::ParseTree* tree) {
|
||||
if (!tree) {
|
||||
throw std::runtime_error("[irgen] parse tree 为空");
|
||||
throw std::runtime_error("[irgen] 语法树为空");
|
||||
}
|
||||
|
||||
auto* cu = dynamic_cast<SysYParser::CompUnitContext*>(tree);
|
||||
if (!cu) {
|
||||
throw std::runtime_error("[irgen] parse tree 根节点不是 compUnit");
|
||||
throw std::runtime_error("[irgen] 语法树根节点不是 compUnit");
|
||||
}
|
||||
|
||||
auto module = std::make_unique<ir::Module>();
|
||||
|
||||
Reference in New Issue
Block a user