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

vfmt: line comments fixes

This commit is contained in:
Alexander Medvednikov
2019-11-18 13:10:31 +03:00
parent 439bb0c5de
commit 1ccd1979a4
11 changed files with 87 additions and 42 deletions

View File

@ -143,7 +143,7 @@ fn (p mut Parser) struct_decl() {
p.check(.colon)
}
p.fmt_inc()
p.fgenln('')
p.fgen_nl()
}
if p.tok == .key_mut {
if is_mut {
@ -156,7 +156,7 @@ fn (p mut Parser) struct_decl() {
p.check(.colon)
}
p.fmt_inc()
p.fgenln('')
p.fgen_nl()
}
// if is_pub {
// }
@ -229,7 +229,7 @@ fn (p mut Parser) struct_decl() {
if p.first_pass() {
p.table.add_field(typ.name, field_name, field_type, is_mut, attr, access_mod)
}
p.fgenln('') // newline between struct fields
p.fgen_nl() // newline between struct fields
}
p.check(.rcbr)
if !is_c && !did_gen_something && p.first_pass() {
@ -280,7 +280,7 @@ fn (p mut Parser) struct_init(typ string) string {
}
p.fspace()
did_gen_something = true
p.fgenln('') // newline between struct fields
p.fgen_nl() // newline between struct fields
}
// If we already set some fields, need to prepend a comma
if t.fields.len != inited_fields.len && inited_fields.len > 0 {