(n node.Node)
| 2572 | } |
| 2573 | |
| 2574 | func (p *Printer) printStmtFor(n node.Node) { |
| 2575 | nn := n.(*stmt.For) |
| 2576 | p.printFreeFloating(nn, freefloating.Start) |
| 2577 | |
| 2578 | io.WriteString(p.w, "for") |
| 2579 | p.printFreeFloating(nn, freefloating.For) |
| 2580 | io.WriteString(p.w, "(") |
| 2581 | p.joinPrint(",", nn.Init) |
| 2582 | p.printFreeFloating(nn, freefloating.InitExpr) |
| 2583 | io.WriteString(p.w, ";") |
| 2584 | p.joinPrint(",", nn.Cond) |
| 2585 | p.printFreeFloating(nn, freefloating.CondExpr) |
| 2586 | io.WriteString(p.w, ";") |
| 2587 | p.joinPrint(",", nn.Loop) |
| 2588 | p.printFreeFloating(nn, freefloating.IncExpr) |
| 2589 | io.WriteString(p.w, ")") |
| 2590 | |
| 2591 | p.Print(nn.Stmt) |
| 2592 | |
| 2593 | p.printFreeFloating(nn, freefloating.End) |
| 2594 | } |
| 2595 | |
| 2596 | func (p *Printer) printStmtForeach(n node.Node) { |
| 2597 | nn := n.(*stmt.Foreach) |
no test coverage detected