(n node.Node)
| 2845 | } |
| 2846 | |
| 2847 | func (p *Printer) printStmtNamespace(n node.Node) { |
| 2848 | nn := n.(*stmt.Namespace) |
| 2849 | p.printFreeFloating(nn, freefloating.Start) |
| 2850 | io.WriteString(p.w, "namespace") |
| 2851 | |
| 2852 | if nn.NamespaceName != nil { |
| 2853 | if nn.NamespaceName.GetFreeFloating().IsEmpty() { |
| 2854 | io.WriteString(p.w, " ") |
| 2855 | } |
| 2856 | p.Print(nn.NamespaceName) |
| 2857 | } |
| 2858 | |
| 2859 | if nn.Stmts != nil { |
| 2860 | p.printFreeFloating(nn, freefloating.Namespace) |
| 2861 | io.WriteString(p.w, "{") |
| 2862 | p.printNodes(nn.Stmts) |
| 2863 | p.printFreeFloating(nn, freefloating.Stmts) |
| 2864 | io.WriteString(p.w, "}") |
| 2865 | } else { |
| 2866 | p.printFreeFloating(nn, freefloating.SemiColon) |
| 2867 | if nn.GetFreeFloating().IsEmpty() { |
| 2868 | io.WriteString(p.w, ";") |
| 2869 | } |
| 2870 | } |
| 2871 | |
| 2872 | p.printFreeFloating(nn, freefloating.End) |
| 2873 | } |
| 2874 | |
| 2875 | func (p *Printer) printStmtNop(n node.Node) { |
| 2876 | p.printFreeFloating(n, freefloating.Start) |
no test coverage detected