Function and structure nodes are a direct representation of Lexica source code. They are part of an abstract syntax tree. This module deals with the processing and verification of parsed nodes.
Represents the signature of a function including any parameters
Represents a parsed function
Contains the expressions of a function
Represents a structure and its fields
The processed function type of the requested function.
The parsed function type of the requested function.
The function node of the requested function.
The directly parsed function of the requested function.
In Lexica, every logical unit of code is an expression. Every expression returns a particular value and type. Code that appears to not have any value such as bindings or mutations have the unit type.
Expressions are stored in a function context object and are accessed through an
ExpressionKey. Nested expressions are denoted with an
ExpressionKey rather than the nested expression itself. This indirection makes it cheaper to copy and process expressions.
Variables are implicitly shadowed when a new binding is made of an already bound variable name. The shadow module assigns generations to variables within the node to distinguish between shadowed variables with the same identifier.
Parameter variables always have a generation of zero as there can never be duplicate parameter identifiers in a function signature.
When ascriptions and function calls are parsed, the actual path to the types and functions are unknown. The resolution module uses the context of a module and its inclusions to resolve the full path of a structure or function.