fix(frontend): 补充不支持语法的警告输出

This commit is contained in:
jing
2026-03-07 22:43:08 +08:00
parent 92f719b7dd
commit 847dc7a5cf
6 changed files with 44 additions and 8 deletions

View File

@@ -16,7 +16,7 @@ IRGenImpl::IRGenImpl(ir::Module& module)
void IRGenImpl::Gen(const ast::CompUnit& ast) {
if (!ast.func || !ast.func->body) {
throw std::runtime_error("AST 不完整:缺少 main 定义");
throw std::runtime_error("[irgen] AST 不完整:缺少 main 定义");
}
GenBlock(*ast.func->body);
}