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

Method printStmtClassConstList

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

Source from the content-addressed store, hash-verified

2317}
2318
2319func (p *Printer) printStmtClassConstList(n node.Node) {
2320 nn := n.(*stmt.ClassConstList)
2321 p.printFreeFloating(nn, freefloating.Start)
2322
2323 if nn.Modifiers != nil {
2324 for k, m := range nn.Modifiers {
2325 if k > 0 && m.GetFreeFloating().IsEmpty() {
2326 io.WriteString(p.w, " ")
2327 }
2328 p.Print(m)
2329 }
2330
2331 if nn.GetFreeFloating().IsEmpty() {
2332 io.WriteString(p.w, " ")
2333 }
2334 }
2335 p.printFreeFloating(nn, freefloating.ModifierList)
2336 io.WriteString(p.w, "const")
2337
2338 if nn.Consts[0].GetFreeFloating().IsEmpty() {
2339 io.WriteString(p.w, " ")
2340 }
2341 p.joinPrint(",", nn.Consts)
2342 p.printFreeFloating(nn, freefloating.ConstList)
2343
2344 p.printFreeFloating(nn, freefloating.SemiColon)
2345 if nn.GetFreeFloating().IsEmpty() {
2346 io.WriteString(p.w, ";")
2347 }
2348
2349 p.printFreeFloating(nn, freefloating.End)
2350}
2351
2352func (p *Printer) printStmtConstList(n node.Node) {
2353 nn := n.(*stmt.ConstList)

Callers 1

printNodeMethod · 0.95

Calls 5

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

Tested by

no test coverage detected