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

Method printNameRelative

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

Source from the content-addressed store, hash-verified

543}
544
545func (p *Printer) printNameRelative(n node.Node) {
546 nn := n.(*name.Relative)
547 p.printFreeFloating(nn, freefloating.Start)
548
549 io.WriteString(p.w, "namespace")
550 p.printFreeFloating(nn, freefloating.Namespace)
551
552 for _, part := range nn.Parts {
553 io.WriteString(p.w, "\\")
554 p.Print(part)
555 }
556
557 p.printFreeFloating(nn, freefloating.End)
558}
559
560// scalar
561

Callers 1

printNodeMethod · 0.95

Calls 2

printFreeFloatingMethod · 0.95
PrintMethod · 0.95

Tested by

no test coverage detected