(def: string)
| 585 | |
| 586 | /** what a string so plain that parsing it can't throw says */ |
| 587 | const scanLeaf = (def: string): Facts | undefined => { |
| 588 | let facts = scanned.get(def) |
| 589 | if (facts === undefined) { |
| 590 | try { |
| 591 | facts = scanUncached(def) ?? null |
| 592 | } catch { |
| 593 | facts = null |
| 594 | } |
| 595 | if (scanned.size >= maxScannedDefs) scanned.clear() |
| 596 | scanned.set(def, facts) |
| 597 | } |
| 598 | return facts ?? undefined |
| 599 | } |
| 600 | |
| 601 | const scanUncached = (def: string): Facts | undefined => { |
| 602 | const withDefault = defaulted.exec(def) |
no test coverage detected