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

Method printExprVariable

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

Source from the content-addressed store, hash-verified

1866}
1867
1868func (p *Printer) printExprVariable(n node.Node) {
1869 nn := n.(*expr.Variable)
1870 p.printFreeFloating(nn, freefloating.Start)
1871
1872 p.printFreeFloating(nn, freefloating.Dollar)
1873 if nn.GetFreeFloating().IsEmpty() {
1874 io.WriteString(p.w, "$")
1875 }
1876
1877 p.Print(nn.VarName)
1878
1879 p.printFreeFloating(nn, freefloating.End)
1880}
1881
1882func (p *Printer) printExprVariableWithoutLeadingDollar(n node.Node) {
1883 nn := n.(*expr.Variable)

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