LazyChooseParsley
parsley.syntax.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
.
Type parameters
- 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.
Value parameters
- 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.
Attributes
- Constructor
-
This constructor should not be called manually, it is designed to be used via Scala's implicit resolution.
- Source
- extension.scala
- Graph
-
- Supertypes
Members list
In this article