laika.parse.Failure
See theFailure companion object
case class Failure(msgProvider: Message, next: SourceCursor, maxOffset: Int) extends Parsed[Nothing]
The failure case of Parsed
containing an error message and the remaining input.
Implementation note:
The message property is of type Message
, to allow for lazy message creation.
The former SDK parser combinators which this API is partially inspired by contained
a lot of unnecessary string concatenations for messages which were then never read.
This implementation avoids this extra cost and the result is measurable
(about 15% performance gain for a typical Markdown document for example).
Attributes
- maxOffset
The offset position the parser could successfully read to before failing
- msgProvider
A provider that produces an error message for this failure based on its SourceCursor
- next
The unconsumed input at the point where the failing parser started
- Companion:
- object
- Graph
- Supertypes
- trait Serializabletrait Producttrait Equalsclass Parsed[Nothing]class Objecttrait Matchableclass Any