()
| 467 | // and re-scan. When the prefix is stable (the common streaming case) the cache |
| 468 | // is kept, so a partial trailing statement never blanks already-completed ones. |
| 469 | function refreshCleaned() { |
| 470 | const next = preprocess(buf); |
| 471 | if (!next.startsWith(cleaned.slice(0, completedEnd))) { |
| 472 | completedEnd = 0; |
| 473 | completedStmtMap.clear(); |
| 474 | completedCount = 0; |
| 475 | firstId = ""; |
| 476 | } |
| 477 | cleaned = next; |
| 478 | } |
| 479 | |
| 480 | function scanNewCompleted(): number { |
| 481 | let depth = 0, |
no test coverage detected