Skip to content

Commit 1b5a471

Browse files
committed
[base] Add a description to <~, ~>, and <::> doccomments
1 parent d6760c6 commit 1b5a471

File tree

3 files changed

+14
-0
lines changed

3 files changed

+14
-0
lines changed

Base/src/main/scala/Extractor.scala

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,13 +153,17 @@ final class Extractor[Expr[_], Type[_], -A] private[stringContextParserCombinato
153153
this.andThen(rhs)(ev)
154154

155155
/**
156+
* Returns a parser which invokes this parser, and upon success invokes the other parser,
157+
* discarding the Unit result from the other parser
156158
* @group Sequence
157159
* @since 0.1.1
158160
*/
159161
def <~(rhs:Extractor[Expr, Type, Unit]):Extractor[Expr, Type, A] =
160162
this.andThen(rhs)(typeclass.ContraSequenced.genericUnit)
161163

162164
/**
165+
* Returns a parser which invokes this parser, and upon success invokes the other parser,
166+
* discarding the Unit result from this parser
163167
* @group Sequence
164168
* @since 0.1.1
165169
*/

Base/src/main/scala/Interpolator.scala

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -189,20 +189,26 @@ final class Interpolator[-Expr, +A] private[stringContextParserCombinator] (
189189
this.andThen(rhs)(ev)
190190

191191
/**
192+
* Returns a parser which invokes this parser, and upon success invokes the other parser,
193+
* discarding the Unit result from the other parser
192194
* @group Sequence
193195
* @since 0.1.1
194196
*/
195197
def <~[ExprZ <: Expr](rhs:Interpolator[ExprZ, Unit]):Interpolator[ExprZ, A] =
196198
this.andThen(rhs)(typeclass.Sequenced.genericUnit)
197199

198200
/**
201+
* Returns a parser which invokes this parser, and upon success invokes the other parser,
202+
* discarding the Unit result from this parser
199203
* @group Sequence
200204
* @since 0.1.1
201205
*/
202206
def ~>[ExprZ <: Expr, B](rhs:Interpolator[ExprZ, B])(implicit ev: A <:< Unit):Interpolator[ExprZ, B] =
203207
this.map(ev).andThen(rhs)(typeclass.Sequenced.unitGeneric)
204208

205209
/**
210+
* Returns a parser which invokes this parser, and upon success invokes the other parser,
211+
* prepending the result from this parser to the List result from the other parser
206212
* @group Sequence
207213
* @since 0.1.1
208214
*/

Base/src/main/scala/Parser.scala

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,13 +154,17 @@ final class Parser[Expr[_], Type[_], A] private[stringContextParserCombinator] (
154154
this.andThen(rhs)(ev)
155155

156156
/**
157+
* Returns a parser which invokes this parser, and upon success invokes the other parser,
158+
* discarding the Unit result from the other parser
157159
* @group Sequence
158160
* @since 0.1.1
159161
*/
160162
def <~(rhs:Parser[Expr, Type, Unit]):Parser[Expr, Type, A] =
161163
this.andThen(rhs)(typeclass.BiSequenced.genericUnit)
162164

163165
/**
166+
* Returns a parser which invokes this parser, and upon success invokes the other parser,
167+
* discarding the Unit result from this parser
164168
* @group Sequence
165169
* @since 0.1.1
166170
*/

0 commit comments

Comments
 (0)