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

@ -223,7 +223,9 @@ fn (p mut Parser) fn_decl() {
is_amp := p.tok == .amp
if is_mut || is_amp {
p.check(p.tok)
p.fspace()
if !is_amp {
p.fspace()
}
}
receiver_typ = p.get_type()
t := p.table.find_type(receiver_typ)
@ -364,7 +366,7 @@ fn (p mut Parser) fn_decl() {
if !is_c && !p.is_vh && !is_fn_header {
p.fspace()
p.check(.lcbr)
//p.fgenln('')
//p.fgen_nl()
}
// Register ?option type
if typ.starts_with('Option_') {
@ -425,7 +427,7 @@ fn (p mut Parser) fn_decl() {
if is_fn_header {
p.genln('$typ $fn_name_cgen($str_args);')
p.fgenln('')
p.fgen_nl()
}
if is_c {
p.fgenln('\n')