Create a new lexer from a piece of code
Attempt to consume the next token. If the token is missing and toConsume is Yes, the following token will be consumed regardless of whether it matches the given pattern. Returns (false, Token) if the token is not of the required type; returns (true, Token) otherwise
Discard the previously-saved lexer state
Check if the next token is EOF
Check if the next token matches the given pattern
Consume the next token and return it
Peek the next token and return it, leaving the lexer in the same state as it was before
Restore the previously-saved lexer state
Save the current state of the lexer
Get the source code that this Lexer is lexing
Attempt to consume the next token if it matches the given pattern. Has no effect on the state of the lexer if the token is not found.
The last consumed token
A lexer for Lua