From: Robert Griesemer Date: Wed, 1 Oct 2008 02:31:27 +0000 (-0700) Subject: more fine-tuning of ;'s X-Git-Tag: weekly.2009-11-06~3065 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=a6400dd448cf534c95f9788add6b3d97f7241dda;p=gostls13.git more fine-tuning of ;'s R=r OCL=16274 CL=16274 --- diff --git a/usr/gri/pretty/printer.go b/usr/gri/pretty/printer.go index 5a6af88878..e6db7ed39d 100644 --- a/usr/gri/pretty/printer.go +++ b/usr/gri/pretty/printer.go @@ -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(" ;");