]> Cypherpunks repositories - gostls13.git/commitdiff
consider each case in a switch independent from the previous one for alignment purposes
authorRobert Griesemer <gri@golang.org>
Tue, 15 Sep 2009 20:53:10 +0000 (13:53 -0700)
committerRobert Griesemer <gri@golang.org>
Tue, 15 Sep 2009 20:53:10 +0000 (13:53 -0700)
R=rsc
DELTA=3  (0 added, 0 deleted, 3 changed)
OCL=34654
CL=34656

src/pkg/go/printer/printer.go

index 202faecab52ce4c57c88355e3b866b411ecb826b..7cd3c493bf447689690e95e857bef219d5a9b79d 100644 (file)
@@ -898,7 +898,7 @@ func (p *printer) block(s *ast.BlockStmt) {
        p.print(s.Pos(), token.LBRACE);
        if len(s.List) > 0 {
                p.stmtList(s.List);
-               p.print(newline);
+               p.print(formfeed);
        }
        p.print(s.Rbrace, token.RBRACE);
 }
@@ -909,10 +909,10 @@ func (p *printer) switchBlock(s *ast.BlockStmt) {
        if len(s.List) > 0 {
                for _, s := range s.List {
                        // s is one of *ast.CaseClause, *ast.TypeCaseClause, *ast.CommClause;
-                       p.print(newline);
+                       p.print(formfeed);
                        p.stmt(s);
                }
-               p.print(newline);
+               p.print(formfeed);
        }
        p.print(s.Rbrace, token.RBRACE);
 }