Package com. github. adriantodt. tartar. extensions. lexer
Types
Lexical Number
Link copied to clipboard
sealed class LexicalNumber
Content copied to clipboard
Class which encapsulates the result of the function readNumber.
Functions
process Token
Link copied to clipboard
fun <T> LexerContext<in Token<T>>.processToken(type: T, back: Int = 1, length: Int = back, offset: Int = 0)
Content copied to clipboard
Emits a token to the lexer, based off the current state of the LexerContext.
fun <T> LexerContext<in StringToken<T>>.processToken(type: T, value: String, back: Int = value.length, length: Int = back, offset: Int = 0)
Content copied to clipboard
Emits a token with a value, based off the current state of the LexerContext.
read Identifier
Link copied to clipboard
Reads a C-like identifier.
read Number
Link copied to clipboard
Reads a number.
read String
Link copied to clipboard
Reads a String up until a delimiter.
section
Link copied to clipboard
Creates a section, based off the current state of the LexerContext.
token
Link copied to clipboard
Creates a token, based off the current state of the LexerContext.
fun <T> LexerContext<in StringToken<T>>.token(type: T, value: String, back: Int = value.length, length: Int = back, offset: Int = 0): StringToken<T>
Content copied to clipboard
Creates a token with a value, based off the current state of the LexerContext.