| ... | ... | @@ -3020,8 +3020,7 @@ static int trans_stmt_extra(Context *c, TransScope *scope, const Stmt *stmt, |
| 3020 | 3020 | if (while_node->data.while_expr.body == nullptr) { |
| 3021 | 3021 | while_node->data.while_expr.body = trans_create_node(c, NodeTypeBlock); |
| 3022 | 3022 | } |
| 3023 | | return wrap_stmt(out_node, out_child_scope, scope, |
| 3024 | | while_node); |
| 3023 | return wrap_stmt(out_node, out_child_scope, scope, while_node); |
| 3025 | 3024 | } |
| 3026 | 3025 | case Stmt::IfStmtClass: |
| 3027 | 3026 | return wrap_stmt(out_node, out_child_scope, scope, |
| ... | ... | @@ -3048,9 +3047,13 @@ static int trans_stmt_extra(Context *c, TransScope *scope, const Stmt *stmt, |
| 3048 | 3047 | case Stmt::DoStmtClass: |
| 3049 | 3048 | return wrap_stmt(out_node, out_child_scope, scope, |
| 3050 | 3049 | trans_do_loop(c, scope, (const DoStmt *)stmt)); |
| 3051 | | case Stmt::ForStmtClass: |
| 3052 | | return wrap_stmt(out_node, out_child_scope, scope, |
| 3053 | | trans_for_loop(c, scope, (const ForStmt *)stmt)); |
| 3050 | case Stmt::ForStmtClass: { |
| 3051 | AstNode *while_node = trans_for_loop(c, scope, (const ForStmt *)stmt); |
| 3052 | if (while_node->data.while_expr.body == nullptr) { |
| 3053 | while_node->data.while_expr.body = trans_create_node(c, NodeTypeBlock); |
| 3054 | } |
| 3055 | return wrap_stmt(out_node, out_child_scope, scope, while_node); |
| 3056 | } |
| 3054 | 3057 | case Stmt::StringLiteralClass: |
| 3055 | 3058 | return wrap_stmt(out_node, out_child_scope, scope, |
| 3056 | 3059 | trans_string_literal(c, scope, (const StringLiteral *)stmt)); |