Parser

harness.cli.Parser
See theParser companion object
trait Parser[T]

Attributes

Companion
object
Graph
Supertypes
class Object
trait Matchable
class Any
Self type
Parser[T]

Members list

Value members

Abstract methods

def buildF(usedParams: Set[Name]): Either[Name, BuildResult[T]]

Concrete methods

final def ##>[T2](other: Parser[T2]): Parser[T2]

Attempts to parse self.
If self passes, disregard the value in self, and attempt to parse other.

Attempts to parse self.
If self passes, disregard the value in self, and attempt to parse other.

Attributes

final def &&[T2](other: Parser[T2])(implicit zip: Zip[T, T2]): Parser[Out]

Requires both self and other to properly parse.
The result is the result of self and other zipped together.

Requires both self and other to properly parse.
The result is the result of self and other zipped together.

Attributes

final def <^||[T2](other: Parser[T2]): Parser[Either[T, T2]]

Helper for &lt;||, that maps self to Left, and other to Right.
NOTE : It is recommended to call .indentedHelpMessage on each parser in a chain of ors.

Helper for &lt;||, that maps self to Left, and other to Right.
NOTE : It is recommended to call .indentedHelpMessage on each parser in a chain of ors.

Attributes

final def <||[T2 >: T](other: Parser[T2]): Parser[T2]

Attempts to parse self.
If self fails, attempts to parse other.
If other also fails, returns the errors from both.
NOTE : It is recommended to call .indentedHelpMessage on each parser in a chain of ors.

Attempts to parse self.
If self fails, attempts to parse other.
If other also fails, returns the errors from both.
NOTE : It is recommended to call .indentedHelpMessage on each parser in a chain of ors.

Attributes

final def as[T2](f: => T2): Parser[T2]
final def default[T2 >: T](dflt: => T2, showDefaultInHelpExtraMessage: Optional[String]): Parser[T2]

Attempts to parse self.
If self passes, pass with that value.
If self fails with only missing params, pass with dflt.
Otherwise, fail.

Attempts to parse self.
If self passes, pass with that value.
If self fails with only missing params, pass with dflt.
Otherwise, fail.

Attributes

final def finalized: FinalizedParser[T]
final def indentedHelpMessage: Parser[T]
final def map[T2](f: T => T2): Parser[T2]
final def optional: Parser[Option[T]]

Attempts to parse self.
If self passes, map to Some(_).
If self fails with only missing params, pass with None.
Otherwise, fail.

Attempts to parse self.
If self passes, map to Some(_).
If self fails with only missing params, pass with None.
Otherwise, fail.

Attributes

final def sectionHelpMessage(section: String): Parser[T]