Skip to content

0.5.0: feature-complete

Compare
Choose a tag to compare
@alaviss alaviss released this 30 Dec 06:30
· 11 commits to main since this release
0.5.0
70ceee8

Once again, we start with parse statistics:

Total parses: 3987;
successful parses: 3950;
failed parses: 37;
success percentage: 99.07%

This is a big milestone, as right now, the only files that couldn't be
parsed are either invalid Nim (used to test the compiler) and/or Nim
using features that were part of one-off experiments that we decided
not to support.

This parser can now parses 100% of Nim.

Let's dive into the details

Parsing improvements

Grammar improvements

  • Concept declaration without body is now supported.

  • type(x) expressions are now supported. Note that while these
    generates (typeof) node, there are no plans to expand this special
    case beyond top-level in order to match how Nim handles this.

Layout improvements

  • Indentation state of the current parse is now removed from the
    scanner. Instead the scanner will reconstruct this state from the
    token stream. This allowed us to remove the get_column dependency,
    speeding up the parser overall.