Skip to content

0.0.3: smaller and better parser

Compare
Choose a tag to compare
@alaviss alaviss released this 28 May 02:59
· 95 commits to main since this release
0.0.3
ecbd15e

Per tradition, let's start with parse statistics:

Total parses: 3226;
successful parses: 3154;
failed parses: 72;
success percentage: 97.77%

The parser size is now 46MiB, only 39% the size of the previous release.
This means the parser can finally be placed within the repository, which
has been done in this release.

Below are notable changes of this cycle:

Breaking changes

  • infix and prefix operators are now unified under the operator
    node.
  • The _ identifier has been split from identifier into
    blank_identifier.
  • tuple_deconstruct_declaration no longer has a child
    symbol_declaration_list. The list contents will now be direct
    children of tuple_deconstruct_declaration.
  • modified_type has been removed in favor of var_type, ref_type,
    etc. directly.

Parsing improvements

  • defer blocks are now supported.
  • pragma expressions precedence has been fixed. Previously they are
    stronger than even an unary expression, now they're on the bottom
    of the chain, similar to the compiler.
  • do blocks can now have pragmas attached to them.

Implementation improvements

  • ), ], } and .} is no longer externalized. This reduced the
    parser size considerably with no loss of functionality.
  • routine expressions are now defined as an extension of their type
    counterpart. This allowed state merging from the parser and reduced
    parser size considerably.

Regressions

  • Unicode operators remains unsupported as adding them still inflates
    the parser size considerably.