* Like `String.prototype.join` except for SourceNodes. Inserts `aStr` between * each of `this.children`. * * @param aSep The separator.
(aSep)
| 2171 | * @param aSep The separator. |
| 2172 | */ |
| 2173 | join(aSep) { |
| 2174 | let newChildren; |
| 2175 | let i; |
| 2176 | const len = this.children.length; |
| 2177 | if (len > 0) { |
| 2178 | newChildren = []; |
| 2179 | for (i = 0; i < len - 1; i++) { |
| 2180 | newChildren.push(this.children[i]); |
| 2181 | newChildren.push(aSep); |
| 2182 | } |
| 2183 | newChildren.push(this.children[i]); |
| 2184 | this.children = newChildren; |
| 2185 | } |
| 2186 | return this; |
| 2187 | } |
| 2188 | |
| 2189 | /** |
| 2190 | * Call String.prototype.replace on the very right-most source snippet. Useful |
no test coverage detected