Result

data class Result<out N : Node>(val node: N, val captureLength: Int)

Represents a successful parse result for a Rule.

A Result encapsulates both the AST node produced by the matched Production, and the total number of tokens consumed (captureLength) from the input Token stream used to produce this Node.

Parameters

N

The type of Node produced

Constructors

Link copied to clipboard
constructor(node: N, captureLength: Int)

Properties

Link copied to clipboard

The number of tokens consumed from the input

Link copied to clipboard
val node: N

The AST Node produced by the production