* Create a new ConditionalNode whose children are the results of calling * the provided callback function for each child of the original node. * @param {function(child: Node, path: string, parent: Node): Node} callback * @returns {ConditionalNode} Returns a transformed copy of the nod
(callback)
| 109 | * @returns {ConditionalNode} Returns a transformed copy of the node |
| 110 | */ |
| 111 | map (callback) { |
| 112 | return new ConditionalNode( |
| 113 | this._ifNode(callback(this.condition, 'condition', this)), |
| 114 | this._ifNode(callback(this.trueExpr, 'trueExpr', this)), |
| 115 | this._ifNode(callback(this.falseExpr, 'falseExpr', this)) |
| 116 | ) |
| 117 | } |
| 118 | |
| 119 | /** |
| 120 | * Create a clone of this node, a shallow copy |