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:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user