Documentation
Maylang language and API reference
a separate, list-only documentation set for the current self-hosted compiler and repository standard library.
Language guide — syntax, values, typing, expressions, control flow, functions, modules, errors and native interfaces.
Syntax catalog — every keyword, type and operator in the maintained editor catalog, with signatures and examples.
Runtime API — built-in functions, methods, OS operations, math, memory and C calls.
Standard library index — links to all library and portable-core API pages and their declaration counts.
Compiler and tooling — build/run commands, CLI options, runtimes, targets, package management and editor integration.
Examples — small strict-mode programs and links to complete repository examples.
Machine-readable inventory — all top-level library and portable-core declarations with exact signatures, module names, kinds and source lines.
Scope: strict self-hosted mayc is the default. Legacy syntax and limitations are labeled. Dynamic Any annotations in source are reproduced rather than replaced with invented static contracts.
Format: every nonblank line of every documentation page is a top-level Markdown bullet. Examples are inline code; pages contain no tables, standalone prose, headings or fenced code blocks.
API entries document actual source signatures, behavior and explicit fault strings where present. Private declarations are included for completeness and marked unavailable to importers.
The compatibility native copy is detailed in native; active injected definitions live in compiler/mayc/native.may. Common helpers live in prelude; explicitly imported library modules have individual pages.
Sources: strict guide, compiler implementation, standard library, editor catalog, and the source links on each module page.
Describe each declaration in its /// source comment, following the doc comment standard; descriptions.json holds only module summaries, module notes and runtime primitives without a source declaration. Edit language/tooling/examples pages directly.
Regenerate the syntax catalog, module pages, index and inventory from the repository root: python3 docs/reference/generate.py.
Check generated freshness, doc comment coverage and form, and the list-only format: python3 docs/reference/generate.py --check.
The generator has no third-party Python dependencies and does not edit existing documentation or language implementation files.
Runnable examples are checked by python3 tests/docs/run.py; CI compiles and executes their actual inline source and all strict-guide fenced examples.
The generated reference replaces the interactive guide, has no Node dependencies or lockfile, and requires only Python for generation.
Update source declarations/descriptions, run both python3 docs/reference/generate.py and python3 tools/maylsp/docs/generate.py, and commit synchronized outputs; CI checks both catalogs with --check.