LexingState

constructor(compilationContext: CompilationContext, position: Int, lineNumber: Int, allTokens: List<A_Token>)

Construct a new immutable LexingState. It starts in a state where the potential tokens at this position have not yet been computed, and no actions have been queued to run against that eventual list of tokens.

Parameters

compilationContext

The CompilationContext in which compilation is occurring.

position

The one-based position in the source.

lineNumber

The one-based line number of this position in the source.

allTokens

The immutable list of A_Tokens that have been parsed up to this position, starting at the current top-level statement, but including any leading whitespace and comment tokens.