Axal::Lexer
Inherits Reference < Object
Constants
KEYWORD = ["and", "else", "end", "false", "fn", "if", "nil", "or", "return", "true", "while", "mod", "fget", "describe", "it"]
ONE_CHAR_LEX = ["(", ")", ":", ",", ".", "-", "+", "/", "*", "[", "]", "{", "}"]
ONE_OR_TWO_CHAR_LEX = ["!", "=", ">", "<"]
WHITESPACE = [" ", "\r", "\t"]
Constructors
new(source : String)
SourceInstance methods
after_source_end_location
Sourcealpha?(c : String)
Sourcealpha_numeric?(c : String)
Sourceconsume
Sourceconsume_digits
Sourcecurrent_location
Sourcedigit?(c : String)
Sourceexternal_code
Sourceidentifier
Sourceignore_comment_line
Sourcelookahead(offset = 1) : String
Sourcenumber
Sourcesource
Sourcesource_completed?
Sourcesource_uncompleted?
Sourcestart_tokenization
Sourcestring
Sourcetoken_from_one_char_lex(lexeme)
Sourcetoken_from_one_or_two_char_lex(lexeme)
Sourcetokens
Sourcetriangle
Source