Roadmap
Sixteen phases from lexer to a tagged v0.1.0 release with a package manager,
language server, standard library and documentation site. Progress is tracked
one micro-step at a time in progress.txt,
one step per commit, no skipping ahead.
Current position
Section titled “Current position”- last step: 5.11
- current phase: 5 (tree-walking interpreter)
- next step: 5.12, the
print,str,intandfloatbuiltins
Phase status
Section titled “Phase status”| Phase | Milestone | State |
|---|---|---|
| 0 | Foundations | done |
| 1 | Lexer | done |
| 2 | AST design | done |
| 3 | Parser: expressions | done |
| 4 | Parser: statements & items | done |
| 5 | Tree-walking interpreter | in progress |
| 6 | Name resolution + type checker | planned |
| 7 | Language feature wave 2 | planned |
| 8 | LLVM backend | planned |
| 9 | WASM target | planned |
| 10 | Standard library | planned |
| 11 | Package manager | planned |
| 12 | Editor highlighting | planned |
| 13 | Language server | planned |
| 14 | Documentation site | planned |
| 15 | Polish + v0.1.0 | planned |
What each phase delivers
Section titled “What each phase delivers”0, Foundations. Workspace, CI, examples, progress tracking.
1, Lexer. The full token stream, with error recovery. Done; see the lexical structure reference.
2, AST design. Node identity, spans, and the node types for expressions, statements, items, types and patterns, plus an s-expression pretty printer for snapshot tests. Done; AST coverage lists what the tree still can’t represent.
3 and 4, Parser. Expressions first, then statements and items. Error
recovery and ariadne diagnostics land at the end of phase 3.
5, Tree-walking interpreter. nex run starts working.
6, Type checker. Name resolution and static typing. This is where v0.1 of the language becomes real.
7, Feature wave 2. Block comments, character literals and the other missing pieces. The spec freezes as v0.1 at the end of this phase.
8 and 9, Backends. LLVM native codegen for nex build, then WebAssembly
via --target wasm32. Every backend has to produce identical output on the
regression corpus.
10 and 11, Standard library and package manager. nex test arrives
alongside the stdlib and its test runner.
12 to 14, Tooling. Editor highlighting, the language server, and this documentation site.
15, Polish. The nex fmt formatter, benchmarks, and the v0.1.0 tag.
Deferred / pending
Section titled “Deferred / pending”- CI doesn’t install LLVM yet. Needed from step 8.2.
- Parser throughput on a 10k-line file: ~274k lines/sec debug, ~948k
release. Re-measured by
crates/nex-syntax/tests/throughput.rs. - Block comments (
/* */) arrive in Phase 7; they currently lex as operators. - Character literals (
'a') are not in the language.
Design notes that shape later phases
Section titled “Design notes that shape later phases”NodeIds are dense and sequential so they can index side tables directly. Later passes store their results in side tables keyed byNodeIdrather than mutating the AST, which stays immutable after parsing.NodeId::DUMMYmarks nodes invented during error recovery. It panics on.index()so a dummy can’t silently corrupt a side table.- Memory management is decided in Phase 8. Current plan: automatic reference
counting emitted by the code generator for heap values (
str, arrays, boxed enums). No ownership or borrow checking in v0.1.