Skip to content

Parsley 4.2.0

Compare
Choose a tag to compare
@j-mie6 j-mie6 released this 22 Jan 22:43
· 150 commits to master since this release
f4f164c

This release aims to do small improvements to two areas of the API: positions and error combinators. New position functionality will be added to a parsley.position module, and old functionality will be moved there with deprecation in place for 5.0.0 removal. Some functionality within parsley.errors.combinator.ErrorMethods will be deprecated, as it has not been particularly useful in its current form. New functionality will be introduced into a separate class to replace this, with semantics that aid in the creation of Verified Errors. New filtering combinators will also be added, along with some missing functionality to do with amend and entrench.

What's Changed

Deprecations

  • Parsley.line, Parsley.col, Parsley.pos deprecated in favour of position.line, position.col, position.pos (to be removed in 5.0.0)
  • Inheritance of the Lexer class is deprecated, class will be final in 5.0.0
  • ErrorMethods.! and ErrorMethods.unexpected deprecated without one-to-one replacement.
  • Deprecated the use of the fullAmend flag/constructor for the FilterConfig subclasses: this was erroneously added, as filtering combinators always use full-amend semantics anyway. These will be removed in 5.0.0

Minor Changes

  • Added position object with line, col, pos, and new offset.
  • Added parsley.errors.patterns.VerifiedErrors extension class, exposing verifiedFail and verifiedUnexpected combinators.
  • Added parsley.errors.combinator.ErrorMethods.unexpectedWithReasonWhen combinator.
  • Added dislodge and amendThenDislodge combinators

Merged PRs

Full Changelog: v4.1.1...v4.2.0