Skip to content

v0.6.6 — Error-tolerant formatter + code-gen brace spacing

Choose a tag to compare

@anzory anzory released this 15 Apr 05:11
· 33 commits to master since this release

What's New

Added

  • Mandatory space inside code-generation braces. The formatter now requires a space after { and before } in { ... } blocks. Empty blocks are written as { }.
    { nl, ';TOOL: ' + tool_name }    ; was: {nl, ';TOOL: ' + tool_name}
    

Changed

  • Formatter no longer bails out on parse errors. Previously a single syntax error anywhere in the file silently disabled the formatter. Now the formatter runs on the best-effort parse tree and, for each line, keeps the formatted version when the lexer preserved all of the line's tokens; lines where tokens were lost or reordered by ANTLR error-recovery are preserved verbatim. Net effect: valid procedures around a broken one are still reformatted.

Fixed

  • Line-structure preservation in error-recovered trees. The formatter now syncs its output with source token line numbers, so collapsed statements (e.g. if a== merged with the next line during recovery) no longer shift subsequent lines in the formatted output.

Tests

75/75 green (10 new formatter tests added).


📦 Install: download .vsix below → VS Code → Extensions → ⋯ → Install from VSIX.