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

Method printExprArrayItem

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

Source from the content-addressed store, hash-verified

1301}
1302
1303func (p *Printer) printExprArrayItem(n node.Node) {
1304 nn := n.(*expr.ArrayItem)
1305 p.printFreeFloating(nn, freefloating.Start)
1306
1307 if nn.Unpack {
1308 io.WriteString(p.w, "...")
1309 }
1310
1311 if nn.Key != nil {
1312 p.Print(nn.Key)
1313 p.printFreeFloating(nn, freefloating.Expr)
1314 io.WriteString(p.w, "=>")
1315 }
1316
1317 p.Print(nn.Val)
1318
1319 p.printFreeFloating(nn, freefloating.End)
1320}
1321
1322func (p *Printer) printExprArray(n node.Node) {
1323 nn := n.(*expr.Array)

Callers 1

printNodeMethod · 0.95

Calls 2

printFreeFloatingMethod · 0.95
PrintMethod · 0.95

Tested by

no test coverage detected