Merge branch 'master' of https://gitee.com/NUDT-compiler/nudt-compiler-cpp
This commit is contained in:
@@ -28,7 +28,7 @@ int main(int argc, char** argv) {
|
||||
|
||||
auto* comp_unit = dynamic_cast<SysYParser::CompUnitContext*>(antlr.tree);
|
||||
if (!comp_unit) {
|
||||
throw std::runtime_error("[main] 语法树根节点不是 compUnit");
|
||||
throw std::runtime_error(FormatError("main", "语法树根节点不是 compUnit"));
|
||||
}
|
||||
auto sema = RunSema(*comp_unit);
|
||||
|
||||
@@ -52,7 +52,7 @@ int main(int argc, char** argv) {
|
||||
mir::PrintAsm(*machine_func, std::cout);
|
||||
}
|
||||
} catch (const std::exception& ex) {
|
||||
std::cerr << "error: " << ex.what() << "\n";
|
||||
PrintException(std::cerr, ex);
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
|
||||
Reference in New Issue
Block a user