ParserResult

sealed class ParserResult<in T>

The result of parsing a string.

Types

Link copied to clipboard
data class Error(    val reason: String,     val position: Int,     val line: Int,     val column: Int) : ParserResult<Any?>

Parsing failed with the given reason, at index position in the input string.

Link copied to clipboard
data class Ok<T>(val result: T, val remainingInput: String) : ParserResult<T>

Parsing succeeded, with the result stored in result and any remaining input stored in remainingInput.

Inheritors

Link copied to clipboard
Link copied to clipboard