mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
parent
711bb6def7
commit
63578e63c6
|
@ -1062,10 +1062,15 @@ pub fn (mut f Fmt) for_stmt(node ast.ForStmt) {
|
|||
if node.label.len > 0 {
|
||||
f.write('$node.label: ')
|
||||
}
|
||||
if node.cond is ast.Comment {
|
||||
f.comments([node.cond])
|
||||
}
|
||||
f.write('for ')
|
||||
f.expr(node.cond)
|
||||
if !node.is_inf {
|
||||
f.write(' ')
|
||||
if node.cond !is ast.Comment {
|
||||
f.expr(node.cond)
|
||||
if !node.is_inf {
|
||||
f.write(' ')
|
||||
}
|
||||
}
|
||||
f.write('{')
|
||||
if node.stmts.len > 0 || node.pos.line_nr < node.pos.last_line {
|
||||
|
|
|
@ -103,3 +103,8 @@ fn between_if_branches() {
|
|||
else {
|
||||
}
|
||||
}
|
||||
|
||||
// comments
|
||||
for {
|
||||
break
|
||||
}
|
||||
|
|
|
@ -87,3 +87,8 @@ fn between_if_branches() {
|
|||
else {
|
||||
}
|
||||
}
|
||||
|
||||
for // comments
|
||||
{
|
||||
break
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user