ParseResult
A base class for parser results. A result is either successful or not
(failure may be fatal, i.e., an Error, or not, i.e., a Failure). On
success, provides a result of type
(and the rest of the input).
(failure may be fatal, i.e., an Error, or not, i.e., a Failure). On
success, provides a result of type
T which consists of some result(and the rest of the input).
Value members
Methods
Functional composition of ParseResults.
- Value Params
- f
-
the function to be lifted over this result
- Returns
-
fapplied to the result of thisParseResult, packaged up as a newParseResult
Partial functional composition of ParseResults.
- Value Params
- error
-
a function that takes the same argument as
fand
produces an error message to explain whyfwasn't applicable
(it is called when this is the case) - f
-
the partial function to be lifted over this result
- Returns
-
if
ff is defined at the result in thisParseResult,f
applied to the result of thisParseResult, packaged up as
a newParseResult. Iffis not defined,Failure.