fix(frontend): 修复部分实现

This commit is contained in:
jing
2026-03-09 15:37:36 +08:00
parent 8aec500b5b
commit e01995a33d
21 changed files with 321 additions and 165 deletions

View File

@@ -5,14 +5,14 @@
#include "SysYParser.h"
#include "ir/IR.h"
void IRGenImpl::GenStmt(SysYParser::StmtContext& stmt) {
bool IRGenImpl::GenStmt(SysYParser::StmtContext& stmt) {
if (stmt.varDecl()) {
GenVarDecl(*stmt.varDecl());
return;
return false;
}
if (stmt.returnStmt()) {
GenReturnStmt(*stmt.returnStmt());
return;
return true;
}
throw std::runtime_error("[irgen] 暂不支持的语句类型");
}