Skip to content

Commit

Permalink
simplify code in app.for_stmt to track windows CI failure
Browse files Browse the repository at this point in the history
  • Loading branch information
spytheman committed Aug 19, 2024
1 parent c2c57e1 commit db0775d
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions stmt.v
Original file line number Diff line number Diff line change
Expand Up @@ -99,12 +99,17 @@ fn (mut app App) for_stmt(f ForStmt) {
// for {}
// if f.cond == unsafe { nil } {
//}
if f.init.node_type_str == '' && f.cond.node_type_str == '' {

init_empty := f.init.node_type_str == ''

cond_empty := f.cond.node_type_str == ''

if init_empty && cond_empty {
app.block_stmt(f.body)
return
}
// for cond {
if f.init.node_type_str == '' && f.cond.node_type_str != '' {
if init_empty && !cond_empty {
app.expr(f.cond)
app.block_stmt(f.body)

Expand Down

0 comments on commit db0775d

Please sign in to comment.