Overview

The compiler architecture is based around units of work called queries. Queries depend only on other queries and may be executed at any time during compilation. This contrasts with traditional pass based architectures that compile the entire source in stages.

The root of the compiler source is found here. The compiler is split into modules with each module generally handling a specific type of query.

Module

Description

Declaration

Parses and registers the location of functions and structures

Parser

Processes a series of tokens into a function or structure node

Node

Processes and verifies function and structure nodes

Inference

Infers the type of expressions in function nodes

Basic

Lowers function nodes into a control flow graphs

Evaluation

Interprets and evaluates the values of expressions

Source

Loads source files

Some modules are not directly related to a specific type of query.

Module

Description

Error

Combines compiler error types and handles displaying errors

Extension

Contains extension traits for existing data types

Lexer

Processes a string source into tokens

‚Äč