Struct LexerRange

Range structure that wraps the lexer's input.

struct LexerRange ;


this (bytes, index, column, line)


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


canPeek (p)
empty () Implements the range primitive empty.
front () Implements the range primitive front.
incrementLine (i) Increments the range's line number and resets the column counter.
mark ()
peek (p)
peekAt (offset)
popFront () Implements the range primitive popFront.
popFrontN (n) Implements the algorithm popFrontN more efficiently. This function does not detect or handle newlines.
seek (m) Sets the range to the given position.
slice (m) 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 (needle)