Success

data class Success<out I : Any, out O, U : Any>(val value: O, val nextIndex: Int, val input: ParserInput<I, U>) : ParseResult<I, O, U>

Indicates that the parser matched successfully.

Constructors

Link copied to clipboard
constructor(value: O, nextIndex: Int, input: ParserInput<I, U>)

Properties

Link copied to clipboard

the ParserInput that was active when this result was produced. Useful for retrieving the ParserInput.userContext or for error reporting.

Link copied to clipboard

the position in the token sequence immediately after the last consumed token. Pass this to the next ParserInput to continue parsing.

Link copied to clipboard
val value: O

the value produced by the parser.