Module lexer

Source

Structsยง

LexerResult
LexerState ๐Ÿ”’
Lexer state for tracking position during tokenization

Functionsยง

handle_ampersand ๐Ÿ”’
Handles ampersand character (logical AND)
handle_block_comment ๐Ÿ”’
Handles multi-line block comments
handle_dash ๐Ÿ”’
Handles dash character (minus or arrow)
handle_equals ๐Ÿ”’
Handles equals character (assignment or equality)
handle_exclamation ๐Ÿ”’
Handles exclamation mark (not or not equal)
handle_greater_than ๐Ÿ”’
Handles greater than character (greater than or greater than or equal)
handle_identifier ๐Ÿ”’
Handles alphabetic identifiers and keywords
handle_invalid_char ๐Ÿ”’
Handles invalid characters
handle_less_than ๐Ÿ”’
Handles less than character (less than or less than or equal)
handle_line_comment ๐Ÿ”’
Handles single-line comments
handle_number ๐Ÿ”’
Handles numeric literals (integers and floating point)
handle_pipe ๐Ÿ”’
Handles pipe character (logical OR)
handle_simple_token ๐Ÿ”’
Handles simple one-character tokens
handle_slash ๐Ÿ”’
Handles slash character (divide or comments)
handle_string ๐Ÿ”’
Handles string literals
handle_whitespace ๐Ÿ”’
Handles whitespace characters in the input
tokenize
Converts source code text into a sequence of tokens with line information