FollowedBy
An intermediate object for creating sequence-based combination methods for a Parser or Consumer.
- Type parameters:
- A
Output type for the "first" parser/consumer; using the combination methods in this trait will result in an instance of T1 being used to create a "second" parser/consumer/transformer to be run sequentially after the first.
- M
Type constructor for the parser/consumer of a given output type
Value members
Abstract methods
Creates a sequence handler by combining this one and a getNext
function such that when this
handler finishes, a second handler is created by passing its result ot getNext
.
Creates a sequence handler by combining this one and a getNext
function such that when this
handler finishes, a second handler is created by passing its result ot getNext
.
- Value parameters:
- followUp
A function that creates the new Parser/Transformer (whichever
M
is in this context) based on the result of this parser
- Returns:
The combined parser/transformer
Concrete methods
Alias for apply
, allowing the use of for-comprehension syntax, e.g.
Alias for apply
, allowing the use of for-comprehension syntax, e.g.
for {
a <- someParser
result <- getNextParser(a)
} yield result
Transforms the intermediate result that will be passed to the followUp
function.
Really this method is only here to allow for-comprehension
syntax to be used - see flatMap
.
You probably don't want to call this explicitly.
Transforms the intermediate result that will be passed to the followUp
function.
Really this method is only here to allow for-comprehension
syntax to be used - see flatMap
.
You probably don't want to call this explicitly.