Code reference detail
langium-rust-parse-align.test.ts
reqlan rq/core_analysis/packages/language/test/langium-rust-parse-align.test.ts
| Idea | Status | Tags | Summary | Katz |
|---|---|---|---|---|
| comment_span_align | done | On every frozen [golden_corpus] `.rq` file, `//` and `/* … */` comment character ranges must be identical across: - the Langium lexer ( hidden `SL_COMMENT` / `ML_COMMENT` ) - `findCommentSpansInText` C-style spans ( host `#` / triple-quote spans are not `.rq` comments ) - TextMate `comment.line.reqlan` and `comment.block.reqlan` scopes Same-line fences, glob `/**/`, URL `://`, and fenced ` ` ` bodies must not open comments. Mid-line triple backticks are prose. They must not open a fence or hide later ideas. Example: `@reqlan/*` in inline code must not open a block comment. Related: [parser_align], ["../language/syntax.rq".code_snippets], ["../language/syntax.rq".comments], ["../language/syntax-edge-cases.rq".fencing_comments], ["../language/syntax.rq".inline_code]. | 0.141 | |
| golden_corpus | done | Parser / extractor alignment uses a frozen `.rq` tree under `testdata/golden-corpus/`, not live product requirements in `reqlan rq/`. Production idea lists may change without regenerating the dump. Copy a representative file into the corpus and refresh `crates/reqlan-index/tests/golden/langium-corpus-names.json` only when grammar or extract behaviour needs a new sample. Langium and Rust both extract name + kind from that tree and must match the committed dump. Live parse alignment ( elements and refs, both engines in one test ): [parser_align]. Comment character ranges on the same tree: [comment_span_align]. | 0.104 | |
| parser_align | done | Langium and `reqlan-parse` stay two engines as a dual-parser **test oracle**. Grammar truth is [syntax] / ["../../packages/language/src/reqlan.langium"]. The same source must yield the same parse snapshot: top-level elements, live bracket and wiki refs, inline-code count, and fence count. One Node test runs Langium and native `parseReqlanSource` ( `parseAlignSnapshot` ) together. A committed name dump is not the only check. The default editor LSP already uses Rust ( [lsp_rust.language_server_rust] ); this idea does not gate that cutover. Related: [golden_corpus], [parser_rust], [comment_span_align]. | 0.150 | |
| parser_rust | done | Recursive-descent parser matching ["../../packages/language/src/reqlan.langium"] productions into a Rust AST the extractor can walk. Recovery: nameless `{...}` and local import mistakes still yield a usable document ( [parser_lexer.recovery_vs_budget] ). Wall-clock [parser_lexer.parse_budget_timeout] via native timeout / cancel — no Node worker process required on the index path. Open `.rq` buffers and CLI `parse` use `reqlan-parse` ( [lsp_rust.language_server_rust] ). Langium remains a dual-parser test oracle and the transitional `node` engine fallback — not the default editor LSP. Alignment contract: [parser_align]. | 0.217 |
Reference labels
comment_span_align, golden_corpus, parser_align, parser_rust