1
0
mirror of https://github.com/golang/go synced 2024-11-26 05:48:05 -07:00

more fine-tuning of ;'s

R=r
OCL=16274
CL=16274
This commit is contained in:
Robert Griesemer 2008-09-30 19:31:27 -07:00
parent 6349d38ebc
commit a6400dd448

View File

@ -49,10 +49,10 @@ func (P *Printer) OpenScope(paren string) {
func (P *Printer) CloseScope(paren string) {
P.level--;
P.indent--;
P.newl = true;
P.semi = false;
P.String(paren);
P.level--;
P.semi, P.newl = false, true;
}
@ -221,6 +221,7 @@ func (P *Printer) DoFuncDecl(x *AST.FuncDecl) {
P.DoIdent(x.ident);
P.DoFunctionType(x.typ);
if x.body != nil {
P.String(" ");
P.DoBlock(x.body);
} else {
P.String(" ;");