mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
v2: simplify MatchExpr in vfmt
This commit is contained in:
parent
5872961124
commit
7daf8f8fd0
@ -443,21 +443,19 @@ fn (f mut Fmt) expr(node ast.Expr) {
|
||||
f.write(', ')
|
||||
}
|
||||
}
|
||||
f.writeln(' {')
|
||||
f.stmts(branch.stmts)
|
||||
f.writeln('}')
|
||||
}
|
||||
// else branch
|
||||
else {
|
||||
f.write('else')
|
||||
}
|
||||
if (branch.stmts.len == 0) {
|
||||
f.writeln('else {}')
|
||||
f.writeln(' {}')
|
||||
} else {
|
||||
f.writeln('else {')
|
||||
f.writeln(' {')
|
||||
f.stmts(branch.stmts)
|
||||
f.writeln('}')
|
||||
}
|
||||
}
|
||||
}
|
||||
f.indent--
|
||||
f.write('}')
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user