fix(irgen): 规范irgen实现
This commit is contained in:
@@ -9,6 +9,7 @@ void IRGenImpl::GenBlock(SysYParser::BlockContext& block) {
|
||||
for (auto* item : block.blockItem()) {
|
||||
if (item) {
|
||||
if (GenBlockItem(*item)) {
|
||||
// 当前语法要求 return 为块内最后一条语句;命中后可停止生成。
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user