From 47c3f7db578ef4558e177f31e377d6f1e1672d0b Mon Sep 17 00:00:00 2001 From: Jamie Willis Date: Tue, 12 Sep 2023 15:01:42 +0100 Subject: [PATCH] [fix] MiMA fixes --- parsley/shared/src/main/scala/parsley/position.scala | 4 +++- project/mima.scala | 2 ++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/parsley/shared/src/main/scala/parsley/position.scala b/parsley/shared/src/main/scala/parsley/position.scala index 0b4db63aa..457c93dcc 100644 --- a/parsley/shared/src/main/scala/parsley/position.scala +++ b/parsley/shared/src/main/scala/parsley/position.scala @@ -106,6 +106,8 @@ object position { */ val offset: Parsley[Int] = internalOffset - //TODO: document and test + private [parsley] def withSpan[A, S](end: Parsley[S])(p: Parsley[A]): Parsley[(S, A, S)] = (end, p, end).zipped + + //TODO: test and document def withWidth[A](p: Parsley[A]): Parsley[(A, Int)] = (offset, p, offset).zipped((s, x, e) => (x, e-s)) } diff --git a/project/mima.scala b/project/mima.scala index 388607453..b4dab7eac 100644 --- a/project/mima.scala +++ b/project/mima.scala @@ -26,6 +26,8 @@ object mima { ProblemFilters.exclude[DirectMissingMethodProblem]("parsley.token.errors.*.label"), ProblemFilters.exclude[IncompatibleMethTypeProblem]("parsley.token.errors.*.this"), ProblemFilters.exclude[IncompatibleMethTypeProblem]("parsley.errors.helpers#WhitespaceOrUnprintable.unapply"), + ProblemFilters.exclude[DirectMissingMethodProblem]("parsley.position.internalOffsetSpan"), + ProblemFilters.exclude[DirectMissingMethodProblem]("parsley.position.spanWith"), // Expression refactor ProblemFilters.exclude[ReversedMissingMethodProblem]("parsley.expr.Fixity.chain"), ProblemFilters.exclude[ReversedMissingMethodProblem]("parsley.expr.Ops.chain"),