* Walk over the tree of JS snippets in this node and its children. The * walking function is called once for each snippet of JS and is passed that * snippet and the its original associated source's line/column location. * * @param aFn The traversal function.
(aFn)
| 2150 | * @param aFn The traversal function. |
| 2151 | */ |
| 2152 | walk(aFn) { |
| 2153 | let chunk; |
| 2154 | for (let i = 0, len = this.children.length; i < len; i++) { |
| 2155 | chunk = this.children[i]; |
| 2156 | if (chunk[isSourceNode]) { |
| 2157 | chunk.walk(aFn); |
| 2158 | } else if (chunk !== "") { |
| 2159 | aFn(chunk, { source: this.source, |
| 2160 | line: this.line, |
| 2161 | column: this.column, |
| 2162 | name: this.name }); |
| 2163 | } |
| 2164 | } |
| 2165 | } |
| 2166 | |
| 2167 | /** |
| 2168 | * Like `String.prototype.join` except for SourceNodes. Inserts `aStr` between |
no outgoing calls
no test coverage detected