Parsley 4.2.0
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 ofposition.line
,position.col
,position.pos
(to be removed in 5.0.0)- Inheritance of the
Lexer
class is deprecated, class will befinal
in 5.0.0 ErrorMethods.!
andErrorMethods.unexpected
deprecated without one-to-one replacement.- Deprecated the use of the
fullAmend
flag/constructor for theFilterConfig
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 withline
,col
,pos
, and newoffset
. - Added
parsley.errors.patterns.VerifiedErrors
extension class, exposingverifiedFail
andverifiedUnexpected
combinators. - Added
parsley.errors.combinator.ErrorMethods.unexpectedWithReasonWhen
combinator. - Added
dislodge
andamendThenDislodge
combinators
Merged PRs
- Version bump to 4.2 by @j-mie6 in #145
- Improved
position
API by @j-mie6 in #146 - Deprecate old error methods by @j-mie6 in #147
- Error pattern combinators by @j-mie6 in #148
- Add
dislodge
andamendThenDislodge
combinators by @j-mie6 in #149 - Introduce
unexpectedWhenWithReason
by @j-mie6 in #151
Full Changelog: v4.1.1...v4.2.0