diff --git a/Base/src/main/scala-3/typeclass/VersionSpecificEithered.scala b/Base/src/main/scala-3/typeclass/VersionSpecificEithered.scala index 9dcc6ba..6481785 100644 --- a/Base/src/main/scala-3/typeclass/VersionSpecificEithered.scala +++ b/Base/src/main/scala-3/typeclass/VersionSpecificEithered.scala @@ -8,6 +8,9 @@ private[typeclass] trait VersionSpecificEithered extends LowPrioEithered { given unitAny[B, Z](using ev:Optionally[B, Z]):Eithered[Unit, B, Z] = Eithered(_ => ev.none, ev.some _) given anyUnit[A, Z](using ev:Optionally[A, Z]):Eithered[A, Unit, Z] = Eithered(ev.some _, _ => ev.none) + /** + * @since 0.1.1 + */ def quotedSplicePiece[A]: Eithered[Expr[A], Expr[Iterable[A]], Repeated.SplicePiece[Expr, A]] = Eithered(new Repeated.SplicePiece.One(_), new Repeated.SplicePiece.Many(_)) } diff --git a/Base/src/main/scala/UnapplyExpr.scala b/Base/src/main/scala/UnapplyExpr.scala index 3f59cb6..86d69e8 100644 --- a/Base/src/main/scala/UnapplyExpr.scala +++ b/Base/src/main/scala/UnapplyExpr.scala @@ -3,7 +3,7 @@ package name.rayrobdod.stringContextParserCombinator import scala.reflect.ClassTag /** - * The data needed to create am Unapply + * The data needed to create an Unapply */ private[stringContextParserCombinator] final case class UnapplyExpr[+Expr[_], +Type[_], -A] ( diff --git a/Base/src/main/scala/typeclass/Repeated.scala b/Base/src/main/scala/typeclass/Repeated.scala index d827d19..459ef53 100644 --- a/Base/src/main/scala/typeclass/Repeated.scala +++ b/Base/src/main/scala/typeclass/Repeated.scala @@ -177,10 +177,12 @@ object Repeated extends VersionSpecificRepeated with LowPrioRepeated { idFromSplicesUsingBuilder(() => List.newBuilder) /** + * Represents either zero items, one item or a sequence of items. * @version 0.1.1 */ sealed trait SplicePiece[Expr[+_], +A] /** + * The [[SplicePiece]] cases * @version 0.1.1 */ object SplicePiece { diff --git a/Base/src/main/scala/typeclass/package.scala b/Base/src/main/scala/typeclass/package.scala index 30f9ace..8033e93 100644 --- a/Base/src/main/scala/typeclass/package.scala +++ b/Base/src/main/scala/typeclass/package.scala @@ -14,6 +14,7 @@ package name.rayrobdod.stringContextParserCombinator * | `orElse` | [[Eithered]] | [[ContraEithered]] | [[BiEithered]] | * | `repeat` | [[Repeated]] | [[ContraRepeated]] | [[BiRepeated]] | * | `optionally` | [[Optionally]] | [[ContraOptionally]] | [[BiOptionally]] | + * | `mapToExpr` | [[ToExprMapping]] | N/A | N/A | * * Thus, if you are only working with interpolators, then you'll only need to work with the unprefixed typeclasses. * diff --git a/CHANGES.md b/CHANGES.md index 88afbbc..b0a8c3d 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -13,7 +13,7 @@ * `quotedConcatenateString` for scala-3 quoted context * Add `Repeat.SplicePiece`; representing either zero, one, or many items; and typeclass instances using `SplicePiece` * for scala-2 macro context: - * `Either.forContextSplicePiece` to combine a `Interpolator[c.Expr[A]]` and a `Interpolator[c.Expr[List[A]]]` into a `Interpolator[SplicePiece[c.Expr, A]]` + * `Either.forContext().splicePiece` to combine a `Interpolator[c.Expr[A]]` and a `Interpolator[c.Expr[List[A]]]` into a `Interpolator[SplicePiece[c.Expr, A]]` * `Repeated.forContextFromSplicesToExprList` to splice the SplicePieces together into a `c.Expr[List[A]]` * `Repeated.forContextFromSplicesUsingBuilder` to splice the SplicePieces together using a arbitrary Builder * for scala-3 quoted context: