(self: Instruction)
| 818 | } |
| 819 | |
| 820 | const getIdentifierInternal = (self: Instruction): Option.Option<string> => { |
| 821 | switch (self._tag) { |
| 822 | case "Empty": { |
| 823 | return Option.none() |
| 824 | } |
| 825 | case "Single": { |
| 826 | return Option.some(self.fullName) |
| 827 | } |
| 828 | case "Both": |
| 829 | case "OrElse": { |
| 830 | const ids = Arr.getSomes([ |
| 831 | getIdentifierInternal(self.left as Instruction), |
| 832 | getIdentifierInternal(self.right as Instruction) |
| 833 | ]) |
| 834 | return Arr.match(ids, { |
| 835 | onEmpty: () => Option.none(), |
| 836 | onNonEmpty: (ids) => Option.some(Arr.join(ids, ", ")) |
| 837 | }) |
| 838 | } |
| 839 | case "KeyValueMap": |
| 840 | case "Variadic": { |
| 841 | return getIdentifierInternal(self.argumentOption as Instruction) |
| 842 | } |
| 843 | case "Map": |
| 844 | case "WithFallback": |
| 845 | case "WithDefault": { |
| 846 | return getIdentifierInternal(self.options as Instruction) |
| 847 | } |
| 848 | } |
| 849 | } |
| 850 | |
| 851 | const getMinSizeInternal = (self: Instruction): number => { |
| 852 | switch (self._tag) { |
no test coverage detected