v0.20.3
Patch release on the 0.20 line: parser error-recovery fixes (two community PRs from @richardwooding) plus a Go normalization safety fix.
Fixed
- C# namespace-internal-error recovery (#115). C# files whose namespace body does not parse cleanly no longer collapse into a single top-level
ERRORnode with zero recoverable declarations. Namespace recovery now falls back to a best-effortnamespace_declarationbuilt from the existing sub-parse, surfacing the type declarations (and the members that parsed). Brace matching during recovery is now trivia-aware, so braces inside char literals, strings, and comments no longer truncate a recovered declaration's span. - Swift comparison-in-condition recovery (#118). Swift functions whose
if/whilecondition contains a comparison operator (</>/==, etc.) no longer collapse into anERRORtree with no recoverablefunction_declaration. The body brace was being consumed as a trailing closure of the condition's last operand; recovery now re-parses the affected conditions with synthetic parentheses and maps the result back to byte-faithful original coordinates. - Go selector-chain normalization.
normalizeGoDotLeafChildrennow walks dotted-selector chains with an iterative DFS instead of recursion, removing a stack-depth risk on very long selector chains.
Changed
- Removed dead unexported code (#117).
Known issues
- #111 (JavaScript standalone block followed by a simple assignment —
{a}b=c— collapsing to a rootERROR) remains open. A banked, skipped regression test ships with this release. The root cause is the JSX-attribute-continuation ASI heuristic in the JS scanner suppressing automatic-semicolon insertion for}identifier=…; the fix is targeted for the C-oracle-verified parity line rather than a point patch.
CI is green on the release commit (build, parity-cgo, freshness).