LazyChooseParsley
parsley.extension$.LazyChooseParsley
final implicit class LazyChooseParsley[P, Q, +A](pq: => (P, Q))(implicit conP: P => Parsley[A], conQ: Q => Parsley[A])
This class exposes an if combinator on pairs of parsers.
This extension class operators on pairs of values that are convertible to parsers. It enables the
use of the ?:
combinator, which is an alias for ifP
.
Attributes
- P
the type of left base value that this class is used on (the conversion to
Parsley
) is summoned automatically.- Q
the type of right base value that this class is used on (the conversion to
Parsley
) is summoned automatically.- conP
a conversion that allows values convertible to parsers to be used.
- conQ
a conversion that allows values convertible to parsers to be used.
- pq
The values (convertible to parsers) that serve the branches of the if.
- Constructor:
This constructor should not be called manually, it is designed to be used via Scala's implicit resolution.
- Version:
4.0.0
- Source:
- extension.scala
- Graph
- Supertypes