public struct LexerRange
Range structure that wraps the _lexer's input.

Variables

bytes
const(ubyte)[]
The input _bytes.
index
size_t
The range's current position.
column
size_t
The current _column number.
line
size_t
The current _line number.

Functions

this
markReturns: a mark at the current position that can then be used with slice.
seekSets the range to the given position.
sliceReturs 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
emptyImplements the range primitive _empty.
frontImplements the range primitive _front.
peekReturns: the current item as well as the items p items ahead.
peekAt
canPeekReturns: true if it is possible to peek p bytes ahead.
popFrontImplements the range primitive _popFront.
popFrontNImplements the algorithm _popFrontN more efficiently. This function does not detect or handle newlines.
incrementLineIncrements the range's line number and resets the column counter.