LazyChooseParsley

parsley.syntax.LazyChooseParsley
final class LazyChooseParsley[+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

Source
extension.scala
Graph
Supertypes
class Object
trait Matchable
class Any

Members list

Value members

Concrete methods

def ?:(b: Parsley[Boolean]): Parsley[A]

This combinator will conditionally parse one of the parsers in this pair depending on the result of a third parser b.

This combinator will conditionally parse one of the parsers in this pair depending on the result of a third parser b.

Equivalent to ifP, but in operator form: ifP(b, p, q) is the same as b ?: (p, q).

Attributes

See also

ifP

Note

Scala applies methods ending in : right-associatively, and the pair is on the right-hand side of the operator.

Source
extension.scala