Skip to content

v0.20.3

Choose a tag to compare

@odvcencio odvcencio released this 24 Jun 04:41

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 ERROR node with zero recoverable declarations. Namespace recovery now falls back to a best-effort namespace_declaration built 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/while condition contains a comparison operator (< / > / ==, etc.) no longer collapse into an ERROR tree with no recoverable function_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. normalizeGoDotLeafChildren now 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 root ERROR) 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).