()
| 858 | return this.nodes.reduce((code, n) => code + n.render(opts), ""); |
| 859 | } |
| 860 | optimizeNodes() { |
| 861 | const { nodes } = this; |
| 862 | let i = nodes.length; |
| 863 | while (i--) { |
| 864 | const n = nodes[i].optimizeNodes(); |
| 865 | if (Array.isArray(n)) |
| 866 | nodes.splice(i, 1, ...n); |
| 867 | else if (n) |
| 868 | nodes[i] = n; |
| 869 | else |
| 870 | nodes.splice(i, 1); |
| 871 | } |
| 872 | return nodes.length > 0 ? this : undefined; |
| 873 | } |
| 874 | optimizeNames(names, constants) { |
| 875 | const { nodes } = this; |
| 876 | let i = nodes.length; |
nothing calls this directly
no test coverage detected