Flect.Compiler.Syntax.Parser

Contains the parser for Flect source code documents.

Source

Functions summary

Functions

parse(tokens, file)

Parses the given list of tokens into a list of Flect.Compiler.Syntax.Nodes representing the module declarations (and everything inside those) of the source code document. Returns the resulting list or throws a Flect.Compiler.Syntax.SyntaxError is the source code is malformed.

tokens must be a list of Flect.Compiler.Syntax.Tokens. file must be a binary containing the file name (used to report syntax errors).

Source