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

Method printExprArrayDimFetch

printer/printer.go:1271–1285  ·  view source on GitHub ↗

expr

(n node.Node)

Source from the content-addressed store, hash-verified

1269// expr
1270
1271func (p *Printer) printExprArrayDimFetch(n node.Node) {
1272 nn := n.(*expr.ArrayDimFetch)
1273 p.printFreeFloating(nn, freefloating.Start)
1274 p.Print(nn.Variable)
1275 p.printFreeFloating(nn, freefloating.Var)
1276 if nn.GetFreeFloating().IsEmpty() {
1277 io.WriteString(p.w, "[")
1278 }
1279 p.Print(nn.Dim)
1280 p.printFreeFloating(nn, freefloating.Expr)
1281 if nn.GetFreeFloating().IsEmpty() {
1282 io.WriteString(p.w, "]")
1283 }
1284 p.printFreeFloating(nn, freefloating.End)
1285}
1286
1287func (p *Printer) printExprArrayDimFetchWithoutLeadingDollar(n node.Node) {
1288 nn := n.(*expr.ArrayDimFetch)

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