feat(tooling): port the doc/lint/grammar checks to Ludic (no Python)
Replace the Python doc/lint/vocabulary guards with Ludic equivalents that run through the `x` task runner, so the checks need no Python interpreter: x check-docs every ```ludic doc fence parses (or is marked) x check-impl every implemented feature has a docs/language page x check-vocabulary vocabulary in sync across grammar / lexer / header / parser x lint-asset <file> validate one editor .json / .xml asset New fragments: tools/x/json.ludic (a small JSON reader — objects/arrays/ strings with \uXXXX + surrogates/numbers/literals, used by the vocabulary check's grammar navigation and the asset validator) and tools/x/checks.ludic (the checks + string helpers + a minimal XML well-formedness validator). `x test-tools` now runs the vocabulary + docs-coverage checks and the JSON/XML asset validation through Ludic instead of python3; ci.yml's docs-coverage step calls `x check-impl` / `x check-vocabulary`. Each port was verified against its former Python script for exact verdict parity on the clean tree and on injected drift (a removed keyword, a broken grammar alternation, an undocumented method). Deletes the superseded scripts: tools/check-vocabulary.py, tools/check-docs.py, tools/docgen/check-impl.py, tools/docgen/validate.py. The docgen site generator (gen.py/check.py/palette.py) and the LSP protocol driver (test-lsp.py) remain and are tracked separately. Toolchain unchanged (seed byte-identical); `x test` (56) and `x test-tools` (29) stay green. Part of #31 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
parent
c040fff8c8
commit
e65e862244
11 changed files with 922 additions and 486 deletions
|
|
@ -17,6 +17,8 @@ program X {
|
|||
import "tools.ludic"
|
||||
import "selfhost_test.ludic"
|
||||
import "test.ludic"
|
||||
import "json.ludic"
|
||||
import "checks.ludic"
|
||||
import "release.ludic"
|
||||
|
||||
function usage() -> void {
|
||||
|
|
@ -36,6 +38,12 @@ program X {
|
|||
print(" x test-tools the editor-toolchain suite")
|
||||
print(" x golden regenerate selfhost/golden/renders.sha256 (review with git diff)")
|
||||
print("")
|
||||
print("doc / lint checks (Ludic, no Python):")
|
||||
print(" x check-docs every ```ludic doc fence parses (or is marked skip/expect-error)")
|
||||
print(" x check-impl every implemented feature has a docs/language page")
|
||||
print(" x check-vocabulary the vocabulary is in sync across grammar / lexer / header / parser")
|
||||
print(" x lint-asset <file> validate one editor .json / .xml asset")
|
||||
print("")
|
||||
print("release:")
|
||||
print(" x version print the toolchain version (ludicc --version)")
|
||||
print(" x release [major|minor|patch] [--publish]")
|
||||
|
|
@ -68,6 +76,10 @@ program X {
|
|||
if (cmd == "test") { exit(cmd_test()) }
|
||||
if (cmd == "selfhost-test") { exit(cmd_selfhost_test()) }
|
||||
if (cmd == "test-tools") { exit(cmd_test_tools()) }
|
||||
if (cmd == "check-docs") { exit(cmd_check_docs()) }
|
||||
if (cmd == "check-impl") { exit(cmd_check_impl()) }
|
||||
if (cmd == "check-vocabulary") { exit(cmd_check_vocab()) }
|
||||
if (cmd == "lint-asset") { exit(cmd_lint_asset()) }
|
||||
if (cmd == "golden") { exit(cmd_golden()) }
|
||||
if (cmd == "bootstrap") { exit(cmd_bootstrap()) }
|
||||
if (cmd == "bootstrap-cfree") { exit(cmd_bootstrap_cfree()) }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue