vfmt: skip {} for pure fn declarations (let the bodies hit the floor)
parent
e80487b35c
commit
3f9b05a876
|
@ -1219,9 +1219,11 @@ pub fn (mut f Fmt) fn_decl(node ast.FnDecl) {
|
||||||
f.attrs(node.attrs)
|
f.attrs(node.attrs)
|
||||||
f.write(node.stringify(f.table, f.cur_mod)) // `Expr` instead of `ast.Expr` in mod ast
|
f.write(node.stringify(f.table, f.cur_mod)) // `Expr` instead of `ast.Expr` in mod ast
|
||||||
if node.language == .v {
|
if node.language == .v {
|
||||||
f.writeln(' {')
|
if !node.no_body {
|
||||||
f.stmts(node.stmts)
|
f.writeln(' {')
|
||||||
f.write('}')
|
f.stmts(node.stmts)
|
||||||
|
f.write('}')
|
||||||
|
}
|
||||||
if !node.is_anon {
|
if !node.is_anon {
|
||||||
f.writeln('\n')
|
f.writeln('\n')
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,5 @@
|
||||||
|
fn proc_pidpath(int, voidptr, int) int
|
||||||
|
|
||||||
|
fn C.realpath(charptr, charptr) &char
|
||||||
|
|
||||||
|
fn C.chmod(byteptr, int) int
|
Loading…
Reference in New Issue