Flect.Compiler.Syntax.Lexer

Contains the lexical analyzer (lexer) for Flect source code documents.

Source

Functions summary

Functions

binary_digit?(arg1)

Returns a Boolean indicating whether the given code point (expected to be a binary) is a binary digit in Flect.

Source

decimal_digit?(arg1)

Returns a Boolean indicating whether the given code point (expected to be a binary) is a decimal digit in Flect.

Source

hexadecimal_digit?(arg1)

Returns a Boolean indicating whether the given code point (expected to be a binary) is a hexadecimal digit in Flect.

Source

identifier_char?(arg1)

Returns a Boolean indicating whether the given code point (expected to be a binary) can be part of an identifier in Flect.

Source

identifier_start_char?(arg1)

Returns a Boolean indicating whether the given code point (expected to be a binary) can start an identifier in Flect.

Source

keyword?(arg1)

Returns a Boolean indicating whether the given string (expected to be a binary) is a keyword in Flect.

Source

lex(text, file)

Lexically analyzes the given source code. Returns a list of tokens on success (which can be empty if the file only contains white space) or raises a Flect.Compiler.Syntax.SyntaxError if the source code is malformed.

The text argument must be a binary containing the source code. It is expected to be encoded in UTF-8. The file argument must be a binary containing the file name (used to report syntax errors).

Source

octal_digit?(arg1)

Returns a Boolean indicating whether the given code point (expected to be a binary) is an octal digit in Flect.

Source