MCPcopy Create free account
hub / github.com/z7zmey/php-parser / printStmtFor

Method printStmtFor

printer/printer.go:2574–2594  ·  view source on GitHub ↗
(n node.Node)

Source from the content-addressed store, hash-verified

2572}
2573
2574func (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
2596func (p *Printer) printStmtForeach(n node.Node) {
2597 nn := n.(*stmt.Foreach)

Callers 1

printNodeMethod · 0.95

Calls 3

printFreeFloatingMethod · 0.95
joinPrintMethod · 0.95
PrintMethod · 0.95

Tested by

no test coverage detected