(e, n)
| 170 | return this.constructor._walk(e, this.rootNode); |
| 171 | } |
| 172 | static _walk(e, n) { |
| 173 | return ( |
| 174 | 'string' == typeof n |
| 175 | ? e.addText(n) |
| 176 | : n.children && |
| 177 | (e.openNode(n), n.children.forEach((n) => this._walk(e, n)), e.closeNode(n)), |
| 178 | e |
| 179 | ); |
| 180 | } |
| 181 | static _collapse(e) { |
| 182 | 'string' != typeof e && |
| 183 | e.children && |