How londopy/nexium works
Nexium is a self-hosted programming language and toolchain. A user writes a .nx program and invokes nx; the compiler parses and checks it, emits C, and uses a C compiler to produce native output. The nx ship workflow packages one source tree into supported library and application artifacts. The README also documents the standard library, editor/LSP tooling, browser playground, and GUI. Compiler internals are largely unsampled, so internal-stage links are omitted rather than inferred; documented product flows are retained.
Main entry points: nx.nx nx CLI · lexer.nx Lexer · parser.nx Parser · check.nx Semantic checker
Components 17
Compiler
- nx CLI
self/nx.nx - Lexer
self/lexer.nx - Parser
self/parser.nx - Semantic checker
self/check.nx - C codegen
self/cgen.nx - C compiler
Runtime and libraries
- Nexium runtime
runtime/nx_rt.h - Standard library
std
Tools and targets
- Native program
- Artifact shipping
self/ship.nx - C, Python, Rust, npm, WASM
- Developer tools
self/tools.nx
User interfaces
- Language server
self/lsp.nx - Editor integrations
editors - Browser playground
site/play.js - Immediate-mode GUI
gui/nexium_gui.nx
Other components
- Developer
Connections 16
- Developer → nx CLI: invokes
README.md - nx CLI → Lexer: processes source
- Lexer → Parser: tokens
- Parser → Semantic checker: syntax tree
- Semantic checker → C codegen: checked program
- C codegen → C compiler: emits C for
README.md - C compiler → Native program: compiles
README.md - Native program → Nexium runtime: uses
- Native program → Standard library: uses
- Developer → Artifact shipping: ships source
README.md - Artifact shipping → C, Python, Rust, npm, WASM: produces
README.md - Developer → Developer tools: runs tools
README.md - Editor integrations → Language server: starts
editors/vscode/package.json - Developer → Browser playground: runs exercises
site/play.js - Browser playground → nx CLI: runs compiler
site/play.js - Developer → Immediate-mode GUI: builds GUI apps
README.md