(expr)
| 844 | } |
| 845 | |
| 846 | function resolveExpression(expr) { |
| 847 | const trimmed = normalizeText(expr); |
| 848 | if (!trimmed) return null; |
| 849 | if ( |
| 850 | (trimmed.startsWith('"') && trimmed.endsWith('"')) || |
| 851 | (trimmed.startsWith("'") && trimmed.endsWith("'")) |
| 852 | ) { |
| 853 | return trimmed |
| 854 | .slice(1, -1) |
| 855 | .replace(/\\n/g, "\n") |
| 856 | .replace(/\\"/g, '"') |
| 857 | .replace(/\\'/g, "'"); |
| 858 | } |
| 859 | if (trimmed.startsWith("`") && trimmed.endsWith("`") && !trimmed.includes("${")) { |
| 860 | return trimmed.slice(1, -1); |
| 861 | } |
| 862 | return constants.get(trimmed) || null; |
| 863 | } |
| 864 | |
| 865 | function findMatchingBrace(startIndex) { |
| 866 | let depth = 0; |
no test coverage detected