Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Provisional API: This reference documents current compiler behavior. Compatibility is not yet promised.

Compiler API (provisional)

Functions and types exposed by each compiler module.

ModuleDescription
src/adapter-memo.xmemoized compiler adapter construction.
src/ast-rewrite.xrewrite immediate AST children through canonical Lists.
src/ast.xshared helpers for x2c compiler AST nodes.
src/builtins.xthe built-in macros’ compile-time algorithms.
src/cache.xcached literal slots and deferred file-static initializers.
src/deps.xMake dependency output for x2c translation units.
src/diagnostics.xcompiler diagnostic storage and rendering.
src/expressions-reports.xexpression typing diagnostics.
src/fields.xstatements that copy or set named fields.
src/format.xcode formatting helpers for the x2c compiler.
src/frontend.xconfigured compiler sessions and source units.
src/grammar.xthe source forms that lowering recognizes.
src/lambdas.xlambda parsing and capture resolution.
src/linked-meta.xshipped meta code compiled into the compiler.
src/main.xx2c command dispatch.
src/meta-helper-client.xthe compiler’s side of the project meta helper.
src/meta-project.xthe project meta build.
src/operator-ledger.xbinary operator facts and case projections.
src/parse-reports.xpackage, binding, and alias diagnostics.
src/preprocess.xC preprocessor directives in x2c source.
src/report.xCommand progress and completion receipts.
src/sourceview.xrequest-owned source overlays.
src/stage.xthe values crossing between meta code and the program.
src/statements.xx2c statement parsing.
src/toolchain.xHost preprocessing, compilation, archive, and link actions.
src/translation.xsynchronous compiler translation requests.
src/type-ledger.xthe compiler’s Var tag tables, projected from the ledger.
src/type.xx2c semantic types.
src/utils.xSystem utilities for environment discovery and workers.
src/callables/callables.xcallable values lowered to C helpers.
src/cleanup/cleanup.xcleanup regions and the transfers that leave them.
src/cli/cli.xx2c command-line parsing and presentation.
src/collect/collect.xsource-ordered shallow symbol collection and replay.
src/compiler/compiler.xone x2c unit’s translation state and its two parses.
src/components/bracket-access.xBracket access policy: Array and Map mutation through their typed helpers, and any other participant’s read, store, and update through its indexing members, with each operand evaluated once, in order. Getter resolution remains with admission.
src/components/collection-literals.xArray and Map literals.
src/components/delegate-members.xdelegate fields.
src/components/destructuring.xflat List destructuring.
src/components/dynamic-operators.xdynamic operators.
src/components/interpolation.xinterpolated Strings.
src/components/lambda-functions.xlambda lowering.
src/components/pattern-match.xmatch statements.
src/components/printf-format.xVar values in printf-family formats.
src/components/protocol-adapters.xprotocol adapters and Var descriptors.
src/components/raise.xraise.
src/components/string-switch.xswitches on a String.
src/components/try-catch.xtry, catch, and finally.
src/emit/emit.xC tokens from normalized x2c ASTs.
src/expressions/expressions.xexpression syntax and its resolution.
src/generate/generate.xthe generated header and source of one unit.
src/initializers/initializers.xbrace initializer conversion.
src/literals/literals.xx2c literal parsing.
src/macros/macros.xsource macros and the compile-time Lisp they run.
src/meta-group/meta-group.xa unit’s meta group, emitted as C.
src/meta-native/meta-native.xmeta functions and the native code they call.
src/meta-sdk/meta-sdk.xthe compiler’s answers to lib/meta.x operations.
src/parse/parse.xx2c declarations, parsed from source or constructed.
src/project/project.xx2c project manifests.
src/protocol/protocol.xprotocols from declaration to conform forms.
src/regions/regions.xvalues that can outlive the region that allocated them.
src/symtab/symtab.xthe compiler’s semantic symbol table.
src/transform/transform.xx2c AST transformation pipeline.