Skip to content

0.7.0

Compare
Choose a tag to compare
@kevinmehall kevinmehall released this 10 Apr 21:09
· 72 commits to master since this release

New features

  • Significantly improved compile-time error messages for invalid grammars
  • Support [MyToken(x)] syntax for capturing variables from pattern expressions (#245)
  • Restore support for [^ ] inverted pattern syntax
  • Add #[no_eof] pub rule() = ... syntax to allow matching a prefix of the input rather than reporting a parse error if the rule does not reach end-of-file (#233)
  • Allow rule _ = without parentheses when defining special underscore rule (#243)
  • Add grammar-level type and lifetime parameters (#254)
  • Compile-time check for repeat expressions that infinite-loop without consuming input (#210)
  • Implement PartialEq, PartialOrd, Eq, Ord, Debug, Hash for RuleResult (#217)

Fixes

  • Extend detection of infinite-loop left recursion to check inside precedence!() (#238)
  • Wrap user-supplied code in immediately-invoked closure so that return and ? behave as expected (#246)
  • Remove overzealous error checks to allow passing rule closure arguments as parameters to another call (#226)

Breaking changes

  • Add required is_eof() method to Parse trait (#252)
  • Certain patterns that would infinite-loop or stack overflow if executed are now a compile-time error
  • mixed_site hygiene prevents action code from accessing internal parser state variables such as __input, __pos, etc.

Contributors

@kevinmehall @dario23 @bgw @adrianwn