(node: BaseNode, opts?: InvokeOptions)
| 638 | |
| 639 | // a one-expression node is written inline |
| 640 | override inv(node: BaseNode, opts?: InvokeOptions): string { |
| 641 | this.reach(node) |
| 642 | const expression = |
| 643 | ( |
| 644 | (opts?.kind ?? this.trav) !== this.trav || |
| 645 | (opts?.arg ?? this.data) !== this.data |
| 646 | ) ? |
| 647 | undefined |
| 648 | : node.is("structure") ? |
| 649 | // a structure sharing transformed keys applies them in a call of its own |
| 650 | this.trav === "Apply" && node.sharesTfs ? |
| 651 | undefined |
| 652 | : node.jsConjunction(this) |
| 653 | : node.jsExpression?.(this) |
| 654 | return expression === undefined ? super.inv(node, opts) : `(${expression})` |
| 655 | } |
| 656 | |
| 657 | override traversal(node: BaseNode, kind: TraversalKind): string { |
| 658 | this.reach(node) |
no test coverage detected