Documentation

Language: VL

VL / Welcome

Article

A small language you can read end to end.

An ordered, random-access compiler. VL is an expression language compiled by a split-crate Rust pipeline. Every stage reports through Ariadne, recovers per item, and lets one root cause stay one error.

VL 0.1+ | macOS 13.0+ | Linux

let x = [1, 3, 5, 7, 9, 11, 13, 15]

function main() { let d = x - 1; d; }


Overview

VL programs are one of the most commonly read things in this repo. You use let to organize your values and function to hold reusable work. For example:

// An array of numbers, nearly the whole language

let x = 1 + 2 * 3;

function main() { let d = x - 1; d; }

You can check an empty program by running the driver. For example:

cargo run -- check examples/hello.vl

cargo run -- build examples/arith.vl --emit lir

Try a line

A stub in Svelte. The real check runs in the Rust driver.

// press Run — this sketch only pretends. The real pipeline lives in the Rust driver.

Topics

Reading the docs

In addition to this page, you can start from these entry points.

Documentation

Three short chapters, front to back.

API reference

One page per crate layer, in dependency order.

CLI reference

Every subcommand of the vl driver.

How a program travels

vl-lex, vl-syntax, vl-semantic

Text becomes tokens, tokens become a tree, names resolve. Nothing here panics on your input.

vl-hir, vl-typecheck, vl-lir

The tree is desugared, checked, and lowered to three-address code.

vl-codegen, vl driver

Backends implement one Target trait. The driver prints every diagnostic.