mirror of
https://github.com/vlang/v.git
synced 2025-09-15 07:22:27 +03:00
vfmt: line comments fixes
This commit is contained in:
parent
439bb0c5de
commit
1ccd1979a4
11 changed files with 87 additions and 42 deletions
|
@ -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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue