(scope, ptn)
| 1794 | return getDefault(scope, variants, star); |
| 1795 | } |
| 1796 | function resolveComplexPattern(scope, ptn) { |
| 1797 | if (scope.dirty.has(ptn)) { |
| 1798 | scope.reportError(new RangeError("Cyclic reference")); |
| 1799 | return new FluentNone(); |
| 1800 | } |
| 1801 | scope.dirty.add(ptn); |
| 1802 | const result = []; |
| 1803 | const useIsolating = scope.bundle._useIsolating && ptn.length > 1; |
| 1804 | for (const elem of ptn) { |
| 1805 | if (typeof elem === "string") { |
| 1806 | result.push(scope.bundle._transform(elem)); |
| 1807 | continue; |
| 1808 | } |
| 1809 | scope.placeables++; |
| 1810 | if (scope.placeables > MAX_PLACEABLES) { |
| 1811 | scope.dirty.delete(ptn); |
| 1812 | throw new RangeError(`Too many placeables expanded: ${scope.placeables}, ` + `max allowed is ${MAX_PLACEABLES}`); |
| 1813 | } |
| 1814 | if (useIsolating) { |
| 1815 | result.push(FSI); |
| 1816 | } |
| 1817 | result.push(resolveExpression(scope, elem).toString(scope)); |
| 1818 | if (useIsolating) { |
| 1819 | result.push(PDI); |
| 1820 | } |
| 1821 | } |
| 1822 | scope.dirty.delete(ptn); |
| 1823 | return result.join(""); |
| 1824 | } |
| 1825 | function resolvePattern(scope, value) { |
| 1826 | if (typeof value === "string") { |
| 1827 | return scope.bundle._transform(value); |
no test coverage detected