1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

vfmt: support a[i] or { panic(err) } too

This commit is contained in:
Delyan Angelov
2021-01-19 08:42:56 +02:00
parent 7037965973
commit 24d1ec2714
2 changed files with 24 additions and 11 deletions

View File

@@ -1222,6 +1222,9 @@ pub fn (mut f Fmt) index_expr(node ast.IndexExpr) {
f.write('[')
f.expr(node.index)
f.write(']')
if node.or_expr.kind != .absent {
f.or_expr(node.or_expr)
}
}
pub fn (mut f Fmt) par_expr(node ast.ParExpr) {