Success

data class Success<T>(val stored: Map<NodeParameterKey<T, *>, *>, val nextIndex: Int, val matchBounds: Pair<Int, Int>, val stopReason: String = "End of expectation reached") : ExpectationResult<T>

This expectation matched successfully. It stored values in stored and the next index that needs to be checked would be nextIndex.

Constructors

Link copied to clipboard
constructor(stored: Map<NodeParameterKey<T, *>, *>, nextIndex: Int, matchBounds: Pair<Int, Int>, stopReason: String = "End of expectation reached")

Properties

Link copied to clipboard

Boundaries for the match: specifically, the index for the first and right after the last token that this success result matched. Boundaries follow the same rules as String.substring (specifically w.r.t. how the boundaries work), except these are indexes for tokens, not characters.

Link copied to clipboard

The next index that needs to be checked to continue the parsing process. May be out of bounds (e.g. to indicate the end of the string)

Link copied to clipboard

Reason for the successful match.

Link copied to clipboard

Values that were stored as a result of this expectation