class

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)
Source

Instance methods

after_source_end_location
Source
alpha?(c : String)
Source
alpha_numeric?(c : String)
Source
consume
Source
consume_digits
Source
current_location
Source
digit?(c : String)
Source
external_code
Source
identifier
Source
ignore_comment_line
Source
lookahead(offset = 1) : String
Source
number
Source
source
Source
source_completed?
Source
source_uncompleted?
Source
start_tokenization
Source
string
Source
token_from_one_char_lex(lexeme)
Source
token_from_one_or_two_char_lex(lexeme)
Source
tokenize

ameba:disable Metrics/CyclomaticComplexity

Source
tokens
Source
triangle
Source