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

Method printStmtUseList

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

Source from the content-addressed store, hash-verified

3195}
3196
3197func (p *Printer) printStmtUseList(n node.Node) {
3198 nn := n.(*stmt.UseList)
3199 p.printFreeFloating(nn, freefloating.Start)
3200
3201 io.WriteString(p.w, "use")
3202
3203 if nn.UseType != nil {
3204 if nn.UseType.GetFreeFloating().IsEmpty() {
3205 io.WriteString(p.w, " ")
3206 }
3207 p.Print(nn.UseType)
3208 }
3209
3210 if nn.Uses[0].GetFreeFloating().IsEmpty() {
3211 io.WriteString(p.w, " ")
3212 }
3213 p.joinPrint(",", nn.Uses)
3214 p.printFreeFloating(nn, freefloating.UseDeclarationList)
3215
3216 p.printFreeFloating(nn, freefloating.SemiColon)
3217 if nn.GetFreeFloating().IsEmpty() {
3218 io.WriteString(p.w, ";")
3219 }
3220
3221 p.printFreeFloating(nn, freefloating.End)
3222}
3223
3224func (p *Printer) printStmtUse(n node.Node) {
3225 nn := n.(*stmt.Use)

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