一键导入
gen-langue
Update Lumo .langue definition files and regenerate the lumo-syntax crate. Use when changing syntax, elab rules, judgments, or the compiler grammar.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Update Lumo .langue definition files and regenerate the lumo-syntax crate. Use when changing syntax, elab rules, judgments, or the compiler grammar.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
| name | gen-langue |
| description | Update Lumo .langue definition files and regenerate the lumo-syntax crate. Use when changing syntax, elab rules, judgments, or the compiler grammar. |
| allowed-tools | Bash(cargo run *) Bash(bash scripts/verify.sh) Read Edit Write Glob Grep |
The language definition under the repo-root lumo/ directory is the
source of truth (D-01); crates/lumo-syntax/src is generated from it
by langc. When the definition changes, regenerate.
Edit the .langue files under lumo/:
Lumo.tokens/item/expr.syn.langue — Lumo surface syntaxMIR.syn.langue, MIR.type.langue — MIR grammar + judgmentsJS.syn.langue — the JS emission subsetlumo/elab/*.elab.langue — elaboration rules (derived rules,
extern rule / extern pass declarations)lumo.langue — the manifest pipeCheck, then regenerate:
cargo run -j 2 -q -p langc -- check lumo
cargo run -j 2 -q -p langc -- gen lumo -o crates/lumo-syntax/src
Implement any new externs by hand in
crates/lumo-syntax/src/elab_externs.rs (generated Externs
traits have no defaults — missing impls fail the build, D-01).
Verify — check + gen-freshness + full workspace tests
(corpus fixtures included; bless with LANGC_UPDATE=1, which only
fills missing expected blocks):
bash scripts/verify.sh
crates/lumo-syntax/src (they
carry an "Auto-generated by langc gen" header); elab_externs.rs,
judge_driver.rs, compile_driver.rs, and tests/ are the
handwritten exceptions.scripts/verify.sh fails if it
drifts from the definition.-j 2 — parallel rustc OOMs this machine.scripts/gen_langue.sh, crates/compiler/lumo.langue,
packages/langue/dist/langue.js) is gone with the Langue 2 rewrite.