Lexer
Constructors
new(text : String, file_path : String, starting_line, log_level : Logger::Level = Logger::Level::Warning)
SourceInstance methods
current_token
Sourcethis function should be called after the opening quote has already been consumed, and does not consume the end quote
handle_import(path = "", column = 1)
parse_import is called when the reader encounters an "import" keyword at the top level. It parses the import statement and sends it to the compiler directly without the need for a separate parser.
log
Sourcenext
Sourceparse_import_alias
Sourceparse_import_bindings
Sourcefunction is called immediately after consumption of the opening quote
parse_number
Sourceparse_path
Sourceparse_whitespace_delimited_string
Sourcepush_newline(loc : Location = @reader.location)
Skip over all whitespace and comments until the next significant character, and pushes a newline token
handle the tokenization of a given word at the given location
push_word_operator(loc, op)
Sourcereader
Sourceskip_whitespace_and_comments
Consumes all comments and whitespace (including '\n') until the next non-whitespace character