Commit 67ab1b9f authored by Robert Griesemer's avatar Robert Griesemer

consider each case in a switch independent from the previous one for alignment purposes

R=rsc
DELTA=3  (0 added, 0 deleted, 3 changed)
OCL=34654
CL=34656
parent 98c98192
...@@ -898,7 +898,7 @@ func (p *printer) block(s *ast.BlockStmt) { ...@@ -898,7 +898,7 @@ func (p *printer) block(s *ast.BlockStmt) {
p.print(s.Pos(), token.LBRACE); p.print(s.Pos(), token.LBRACE);
if len(s.List) > 0 { if len(s.List) > 0 {
p.stmtList(s.List); p.stmtList(s.List);
p.print(newline); p.print(formfeed);
} }
p.print(s.Rbrace, token.RBRACE); p.print(s.Rbrace, token.RBRACE);
} }
...@@ -909,10 +909,10 @@ func (p *printer) switchBlock(s *ast.BlockStmt) { ...@@ -909,10 +909,10 @@ func (p *printer) switchBlock(s *ast.BlockStmt) {
if len(s.List) > 0 { if len(s.List) > 0 {
for _, s := range s.List { for _, s := range s.List {
// s is one of *ast.CaseClause, *ast.TypeCaseClause, *ast.CommClause; // s is one of *ast.CaseClause, *ast.TypeCaseClause, *ast.CommClause;
p.print(newline); p.print(formfeed);
p.stmt(s); p.stmt(s);
} }
p.print(newline); p.print(formfeed);
} }
p.print(s.Rbrace, token.RBRACE); p.print(s.Rbrace, token.RBRACE);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment