Skip to content

Releases: alaviss/tree-sitter-nim

0.0.2: smaller parser but parses more

10 May 23:54
0.0.2
074df32
Compare
Choose a tag to compare

This cycle was rather big, a lot of changes has been made
to both reduces the parser size and improve parsing correctness.

Let's start off with the parse statistics against the Nim compiler
source code + nimble:

Total parses: 3220;
successful parses: 3147;
failed parses: 73;
success percentage: 97.73%

The parser size is now 118MiB, which unfortunately is still too big
for GitHub, but we are getting there.

Below are the changes in detail:

Breaking changes

  • Symbolic operators are exposed as syntactic nodes (#12)
  • Call arguments are now stowed in an argument_list node (#15)
  • Escape sequences for strings and char now have their own nodes (#13)

Parsing improvements

  • Dot generic calls (eg. x.foo[:T]) are now fully supported
  • Function with an empty body and only comments can now be parsed
  • Complex expressions are now supported for enum values
  • when in object declarations can now have fields declared on the same line
  • Tuple-with-var return values are now correctly parsed
  • Cast expression now supports colon expressions
  • Block comment contents no longer erroneously set the parsing indent

Regressions

  • Unicode operators support has been disabled to prevent parser size
    from growing uncontrollably
  • Some parsing has been relaxed and "invalid" structures might be parsed
    successfully. See corpus/deviations.txt for known deviations from
    the Nim compiler.

0.0.1: initial release

07 May 02:05
0.0.1
5192f32
Compare
Choose a tag to compare
Pre-release

First release of a grammar that "sorta" works.

Following is the parse statistics against the Nim compiler source code:

Total parses: 3691;
successful parses: 3588;
failed parses: 103;
success percentage: 97.21%

The parser is still in early development and nodes are expected to
change.

A generated version of the parser has been attached to this release
for your convenience.