refactor(dev): unify user-facing diagnostics
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"));
|
||||
}
|
||||
RunSema(*comp_unit);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user