fix(frontend): 修复部分实现
This commit is contained in:
@@ -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] 暂不支持的语句类型");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user