Attributes
Members list
Type members
Classlikes
Will attempt to parse left, and then right with the remaining args after parsing left. Both left and right must succeed in order for this parser to succeed.
Will attempt to parse left, and then right with the remaining args after parsing left. Both left and right must succeed in order for this parser to succeed.
Attributes
- Supertypes
Attributes
- Companion
- trait
- Supertypes
-
trait Sumtrait Mirrorclass Objecttrait Matchableclass Any
- Self type
-
FinalParseResult.type
Will take all parsers specified, each attempting to parse the remaining arguments. If none succeed, will return the errors from all parsers. If only one succeeds, will return the success of that parser. If multiple succeed, will return the first success order wise.
Will take all parsers specified, each attempting to parse the remaining arguments. If none succeed, will return the errors from all parsers. If only one succeeds, will return the success of that parser. If multiple succeed, will return the first success order wise.
Multi example: --key-1=value-1 --key-2=value-2 Both succeed with Key1("value-1")
and Key2("value-2")
. Key1("value-1")
would be the success that is returned.
This is useful when you want to be able to parse an ADT, and have the results come back in a fixed order. In the above example, if you had 2 separate list parsers for key-1
and key-2
, you would not know what order they were parsed in. But, if you combined them into an ADT, used Params.firstOf, and Params.repeated, then you would be able to know what order things were parsed in:
- --key-1=value-1 --key-2=value-2 ->
List(Key1("value-1"), Key2("value-2"))
- --key-2=value-2 --key-1=value-1 ->
List(Key2("value-2"), Key1("value-1"))
Attributes
- Supertypes
Will attempt to parse left. If parsing left succeeds, parsing right will not be attempted, and this parser will succeed with left's success. If parsing left fails, parsing right will be attempted. If parsing right succeeds, this parser will succeed with right's success. If parsing right fails, this parser will fail with both the errors of left and right.
Will attempt to parse left. If parsing left succeeds, parsing right will not be attempted, and this parser will succeed with left's success. If parsing left fails, parsing right will be attempted. If parsing right succeeds, this parser will succeed with right's success. If parsing right fails, this parser will fail with both the errors of left and right.
Attributes
- Supertypes
Attributes
- Companion
- trait
- Supertypes
-
trait Sumtrait Mirrorclass Objecttrait Matchableclass Any
- Self type
-
ParseResult.type
Attributes
- Companion
- object
- Supertypes
-
trait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass AnyShow all
Attributes
- Companion
- class
- Supertypes
-
trait Producttrait Mirrorclass Objecttrait Matchableclass Any
- Self type
-
ParsedParams.type
Inherited and Abstract types
The names of the product elements
The names of the product elements
Attributes
- Inherited from:
- Mirror
The name of the type
The name of the type
Attributes
- Inherited from:
- Mirror
Value members
Concrete methods
Attributes
- See also