mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
vfmt: fix formatting of 'import mod as alias'
This commit is contained in:

committed by
Alexander Medvednikov

parent
286a0a1371
commit
222f2f08f6
@ -171,7 +171,9 @@ fn (p mut Parser) fnext() {
|
||||
p.fgen_nl()
|
||||
p.fmt_inc()
|
||||
}
|
||||
|
||||
if p.token_idx >= p.tokens.len {
|
||||
return
|
||||
}
|
||||
// Skip comments and add them to vfmt output
|
||||
if p.tokens[p.token_idx].tok in [.line_comment, .mline_comment] {
|
||||
// Newline before the comment and after consts and closing }
|
||||
|
Reference in New Issue
Block a user