diff --git a/parsley/shared/src/main/scala/parsley/errors/combinator.scala b/parsley/shared/src/main/scala/parsley/errors/combinator.scala index 1580dd850..1868ee13c 100644 --- a/parsley/shared/src/main/scala/parsley/errors/combinator.scala +++ b/parsley/shared/src/main/scala/parsley/errors/combinator.scala @@ -121,6 +121,9 @@ object combinator { */ def amend[A](p: Parsley[A]): Parsley[A] = new Parsley(new frontend.ErrorAmend(p.internal, partial = false)) + // TODO: document + def partialAmend[A](p: Parsley[A]): Parsley[A] = new Parsley(new frontend.ErrorAmend(p.internal, partial = true)) + /** This combinator prevents the action of any enclosing `amend` on the errors generated by the given * parser. * @@ -170,19 +173,20 @@ object combinator { * @param p a parser whose error messages should be amended unless its been entrenched. * @return a parser that parses `p` but ensures any errors generated occur as if no input were consumed. * @since 4.2.0 - * @see [[amend `amend`]] and [[dislodge[A](by:Int)* `dislodge`]] + * @see [[amend `amend`]] and [[dislodge[A](p:parsley\.Parsley[A])* `dislodge`]] * @group adj */ def amendThenDislodge[A](p: Parsley[A]): Parsley[A] = amendThenDislodge(Int.MaxValue)(p) // TODO: document def amendThenDislodge[A](by: Int)(p: Parsley[A]): Parsley[A] = dislodge(by)(amend(p)) - // TODO: document - def partialAmend[A](p: Parsley[A]): Parsley[A] = new Parsley(new frontend.ErrorAmend(p.internal, partial = true)) + // These don't need coverage really, they are basically the same as the ones above + // $COVERAGE-OFF$ // TODO: document def partialAmendThenDislodge[A](p: Parsley[A]): Parsley[A] = partialAmendThenDislodge(Int.MaxValue)(p) // TODO: document def partialAmendThenDislodge[A](by: Int)(p: Parsley[A]): Parsley[A] = dislodge(by)(partialAmend(p)) + // $COVERAGE-ON$ /** This combinator marks any errors within the given parser as being ''lexical errors''. *