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

Method printStmtGroupUse

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

Source from the content-addressed store, hash-verified

2708}
2709
2710func (p *Printer) printStmtGroupUse(n node.Node) {
2711 nn := n.(*stmt.GroupUse)
2712 p.printFreeFloating(nn, freefloating.Start)
2713
2714 io.WriteString(p.w, "use")
2715 p.printFreeFloating(nn, freefloating.Use)
2716
2717 if nn.UseType != nil {
2718 if nn.UseType.GetFreeFloating().IsEmpty() {
2719 io.WriteString(p.w, " ")
2720 }
2721 p.Print(nn.UseType)
2722 }
2723
2724 if nn.Prefix.GetFreeFloating().IsEmpty() {
2725 io.WriteString(p.w, " ")
2726 }
2727 p.Print(nn.Prefix)
2728 io.WriteString(p.w, "\\")
2729 p.printFreeFloating(nn, freefloating.Slash)
2730
2731 io.WriteString(p.w, "{")
2732 p.joinPrint(",", nn.UseList)
2733 p.printFreeFloating(nn, freefloating.Stmts)
2734 io.WriteString(p.w, "}")
2735 p.printFreeFloating(nn, freefloating.UseDeclarationList)
2736
2737 p.printFreeFloating(nn, freefloating.SemiColon)
2738 if nn.GetFreeFloating().IsEmpty() {
2739 io.WriteString(p.w, ";")
2740 }
2741
2742 p.printFreeFloating(nn, freefloating.End)
2743}
2744
2745func (p *Printer) printStmtHaltCompiler(n node.Node) {
2746 nn := n.(*stmt.HaltCompiler)

Callers 1

printNodeMethod · 0.95

Calls 5

printFreeFloatingMethod · 0.95
PrintMethod · 0.95
joinPrintMethod · 0.95
IsEmptyMethod · 0.80
GetFreeFloatingMethod · 0.65

Tested by

no test coverage detected