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

Method printStmtUse

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

Source from the content-addressed store, hash-verified

3222}
3223
3224func (p *Printer) printStmtUse(n node.Node) {
3225 nn := n.(*stmt.Use)
3226 p.printFreeFloating(nn, freefloating.Start)
3227
3228 if nn.UseType != nil {
3229 p.Print(nn.UseType)
3230 if nn.UseType.GetFreeFloating().IsEmpty() {
3231 io.WriteString(p.w, " ")
3232 }
3233 }
3234
3235 p.printFreeFloating(nn, freefloating.Slash)
3236
3237 p.Print(nn.Use)
3238
3239 if nn.Alias != nil {
3240 if nn.Alias.GetFreeFloating().IsEmpty() {
3241 io.WriteString(p.w, " ")
3242 }
3243 io.WriteString(p.w, "as")
3244 if nn.Alias.GetFreeFloating().IsEmpty() {
3245 io.WriteString(p.w, " ")
3246 }
3247 p.Print(nn.Alias)
3248 }
3249
3250 p.printFreeFloating(nn, freefloating.End)
3251}
3252
3253func (p *Printer) printStmtWhile(n node.Node) {
3254 nn := n.(*stmt.While)

Callers 1

printNodeMethod · 0.95

Calls 4

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

Tested by

no test coverage detected