Merge lang/foundations (9391695) into lang/schemacode: LANGUAGE.md's command list keeps --stdin-file (R10), the code map in schema (R7) and ludic syntax (R8); selfhost/main.ludic carries all three flags; reseeded from the merged source, bootstrap-cfree fixpoint holds (298653 lines), syntax --check clean, no conflict markers

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Orkun ÇAKILKAYA 2026-09-30 00:21:47 +03:00
commit d39a27a904
81 changed files with 114027 additions and 104730 deletions

View file

@ -2360,7 +2360,9 @@ ludic test -j 4 # four tests at once (default: one per
ludic test packages/ludic.base # the test programs under a directory (a package's)
ludic build --check # every check a build makes, nothing written
ludic build --check --diagnostics=json # the same, every error as a JSON array on stdout
ludic build --check --diagnostics=json --stdin-file src/a.ludic < buf # stdin in place of src/a.ludic
ludic schema -o build/schema.json # records, registries, entries, consts, components, natives, lang and the code map, for editors
ludic syntax --json # the language's vocabulary: keywords, declarations, types, phases, attributes, operators
ludic deps # how tangled the modules are, as the compiler resolved them
ludic deps --check tests/deps-baseline.txt # fail when a number rose (--baseline FILE writes them)
@ -2382,6 +2384,17 @@ type error is in it, every `@Ref` naming no registry, and every module rule brok
unknown name while lowering, a def into a registry that does not exist - ends the array, and type
errors end it before the module rules are looked at.
`--stdin-file <path>` (`ludicc --check --stdin-file <path>`; on `ludic build` it implies `--check`)
checks an unsaved buffer: the program is the usual one - the package's entry, or the file named - but
wherever the compiler would open `<path>` it reads the text on stdin instead, read once and whole (an
empty stdin is an empty file). That is any file it opens: the entry, an import reached through a
barrel, a component's `.xml` or `.lss`, an `.lres`. The two paths are compared after normalising
both - `\` made `/`, a relative path put under the directory the compiler was started in, `.`, `..`
and doubled `/` folded, and case on Windows - so `./src/foo/../foo/bar.ludic` is `src/foo/bar.ludic`.
Diagnostics name the file as a check of the saved file would, with lines and columns in the
buffer's text. A `<path>` the program never opens is one warning on that path, rather than a clean
report on the saved files.
`ludic deps` compiles the program (the package's entry, or a file) with the compiler recording every
reference its visibility pass resolves - from the module it is written in to the module of what it
names - and every assignment to another module's global. It prints five numbers: `modules` (the
@ -2476,6 +2489,16 @@ Plugins for VS Code and JetBrains IDEs, plus configuration for Neovim, Helix,
Emacs, Sublime and Zed, are in `tools/editors/` — see
[tools/editors/README.md](tools/editors/README.md).
The vocabulary every editor highlights with is the compiler's: `ludic syntax
--json` (`ludicc --emit-syntax`) prints every keyword with its role and whether
the parser reserves it, every declaration's form, the built-in types and phases,
every attribute with what it goes on, its arguments and what it means, the
operators and the literal forms. The grammars in `tools/editors/`, the language
server's word lists and `ludic_syntax.h` are written from it between marked lines
(`bin/ludic-dev syntax`), and `bin/ludic-dev syntax --check` fails when one falls
behind, when docs/language lacks a page for an entry, or when the parser tests a
word the vocabulary does not have.
## Working programs
- `examples/games/chronorift.ludic` — a co-op JRPG (overworld, dungeon, boss, shop,