Struct LexerRange

Range structure that wraps the lexer's input.

struct LexerRange ;

Constructors

NameDescription
this

Fields

NameTypeDescription
bytes const(ubyte)[]The input bytes.
column ulongThe current column number.
index ulongThe range's current position.
line ulongThe current line number.

Methods

NameDescription
canPeek
empty Implements the range primitive empty.
front Implements the range primitive front.
incrementLine Increments the range's line number and resets the column counter.
mark
peek
peekAt
popFront Implements the range primitive popFront.
popFrontN Implements the algorithm popFrontN more efficiently. This function does not detect or handle newlines.
seek Sets the range to the given position.
slice Returns a slice of the input byte array between the given mark and the current position. Params m = the beginning index of the slice to return
startsWith