(path, print)
| 778 | } |
| 779 | |
| 780 | function printParams(path, print) { |
| 781 | const { node } = path; |
| 782 | const parts = []; |
| 783 | |
| 784 | if (node.params.length > 0) { |
| 785 | parts.push(...path.map(print, "params")); |
| 786 | } |
| 787 | |
| 788 | if (node.hash?.pairs.length > 0) { |
| 789 | parts.push(print("hash")); |
| 790 | } |
| 791 | |
| 792 | if (parts.length === 0) { |
| 793 | return ""; |
| 794 | } |
| 795 | |
| 796 | return join(line, parts); |
| 797 | } |
| 798 | |
| 799 | function printBlockParams(node) { |
| 800 | return ["as |", node.blockParams.join(" "), "|"]; |
no test coverage detected
searching dependent graphs…