Code reference detail
source.rs
crates/reqlan-napi/src/source.rs
| Idea | Status | Tags | Summary | Katz |
|---|---|---|---|---|
| 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.125 | |
| napi_module_barrel | done | per [stack] `crates/reqlan-napi/src/lib.rs` is a barrel: it only declares modules and re-exports the napi items. Logic lives in one module per binding surface. Modules: `scan.rs` ( scanWorkspace task, createBase ), `analysis.rs` ( NativeAnalysisRuntime ), `sql_db.rs` ( NativeSqlDb ), `workspace_index.rs` ( NativeWorkspaceIndex ), `source.rs` ( parse / extract / local-symbolic source helpers ), `planner.rs` ( barrel / move / delete plan ), `util.rs` ( shared error mappers, wire-JSON helpers ). Invariants: the JS surface and generated napi `.d.ts` do not change; modules stay flat in `src/` so `rq:[...]` comment paths keep `../../../reqlan rq` depth; `rq:` doc comments move with their items; `@implementation` refs in ["../../reqlan rq"] point at the module that holds the item, not the barrel. New analysis bindings must follow ["../core_analysis/rope.rq".rope]: engine item in `reqlan-analytical`, `analysis.rs` binding, AnalysisApi facade, and cross-referenced tests. | 0.036 | |
| local_symbolic_analysis | done | Open-file symbolic analysis must run in Rust on one file only. Input: file URI plus source text ( and optional import-root mappings ). Output: ideas in that file, import binding names in that file, outbound edges with UTF-8 source byte spans, and same-file inbound backlinks ( edges whose target is an idea declared in this file ). Import binding names let a qualified reference name an import alias ( ["../core_analysis/check.rq".check_qualified_missing_idea] ). LSP document-link and error underlines must convert those spans to UTF-16 ( ["../extension/language/syntax/features-syntax-highlighting.rq".reference_underline_syntax_align] ). Cross-file inbound still comes from SQLite via ["./cache-reuse.rq".unify_inbound_indexes]. Do not read SQLite. Do not walk other workspace documents. Do not load an idea catalog. The open-buffer model is ["../extension/language/support/open-file-sequencing.rq".ast_lifecycle]. The hot path parses this buffer once. It does not run this extract as a second parse. Import-target confirmation is a separate depth-1 parse ( ["../extension/language/support/open-file-sequencing.rq".outbound_one_hop] ). That parse is not this extract. The language server caches the open buffer by URI plus text fingerprint ( ["../extension/language/support/open-file-sequencing.rq".open_file_hot_path] ). Wildcard forms stay one `wildcard_reference` pattern edge ( unresolved ); sync still expands them later via [wildcard_reference_edges]. Flag: `ExtractOptions.local_symbolic` forces an empty candidate list. CLI: ["../cli/cli_package.rq".commands] `analyse --local-symbolic <file>`. Sidebar: ["../extension/local-context/activitybar-panels/current_context_scope.rq".reference_lists_pane] merges live same-file inbound / outbound with indexed refs ( [local_symbolic_sidebar] ). Related: ["../language/syntax.rq".open_file_reference_sequencing], [index], ["./cache-reuse.rq".unify_inbound_indexes]. | 0.320 |
Reference labels
"../../crates/reqlan-napi/src/source.rs"