|
Z / libzlang 0.29.0
C99 runtime library and the Zlang 0.29 source-to-source compiler
|
Z contains two related pieces:
The CMake targets are zlang::zlang for the runtime, zlang::compiler_core for the compiler library and zc for the command line driver.
Include the umbrella header to reach every public module:
The generated API reference is published at https://z.iantorres.cl.
| Header | Purpose |
|---|---|
| zlang/version/version.h | Compile-time version macros and zlang_get_version() |
| zlang/testing/testing.h | Header-only test runner used by the project's own tests |
| zlang/runtime/runtime.h | Bounded strings, checked arithmetic, append, concatenation and trap helpers |
Each public module keeps its header at include/zlang/<module>/<module>.h. Private helpers live under include/zlang/detail/.
The compiler library is internal to the repository but documented here because the emitted C is part of the product contract.
| Header | Purpose |
|---|---|
| zlang/compiler/lexer.h | Tokenizer with caller-owned scratch storage |
| zlang/compiler/parser.h | Recursive-descent parser for Zlang |
| zlang/compiler/ast.h | Flat AST representation using indices |
| zlang/compiler/diagnostics.h | Stable diagnostic codes and source locations |
| zlang/compiler/semantics.h | Type and binding checks |
| zlang/compiler/planner.h | Compile-time storage placement |
| zlang/compiler/emitter.h | C99 emitter |
Diagnostics use the canonical form:
The canonical language level is C99. CI also compiles C11, C17 and C23, with sanitizers and on multiple architectures.