Code reference detail
references.test.ts
reqlan rq/language/packages/language/test/references.test.ts
| Idea | Status | Tags | Summary | Katz |
|---|---|---|---|---|
| anonymous_imports_allowed | done | A quoted path plus idea — for example `["../ontology.rq".attribute]` — opens that file as an ideaset. Every idea in the target file is in scope for that reference. A from-import or qualified import of the same path only binds the listed names for bare `[name]` references. It must not hide other ideas from a quoted-path reference. | 0.073 | |
| fencing_comments | done | A complete same-line fence keeps `//` and `/*` as prose, not comments. Closed double quotes: " / / this line " contains no comment. Closed backticks: `//this line` contains no comment. Closed backticks with a glob: `@reqlan/*` does not open a block comment. An unclosed backtick is not a fence, so this line ` An unclosed quote is not a fence, so as does " The Langium lexer, the Rust lexer, comment scanners, and TextMate must use this rule. Related: ["./syntax.rq".comments], ["./syntax.rq".inline_code], ["./syntax.rq".naked_strings_in_body], ["../core_analysis/rust_port.rq".comment_span_align]. | 0.078 | |
| code_snippets | Idea bodies and block attribute values may embed fenced code blocks delimited by triple backticks. An opening fence is three backticks as the first non-whitespace characters on a line, optionally followed by a language tag such as python or rq. A closing fence is three backticks as the first non-whitespace characters on a line. Three backticks in the middle of a line are prose. They do not open a fence. Everything between the fences is literal opaque text — it is not parsed as reqlan syntax. Keywords, imports, attributes, braces, and quotes inside a fence are inert for the parser and may be shown as examples without parse errors. Fenced blocks may span multiple lines and preserve their inner content verbatim. Brace-depth tracking must skip fence interiors so example braces cannot desync surrounding structure ( [no_name_idea_safe_warning] ). Related: ["../core_analysis/rust_port.rq".comment_span_align]. | 0.113 | ||
| comment_reference | done | Reqlan references may appear in line comments of arbitrary source files. Comment reference syntax is `rq:[idea]` or `rq:["path".idea]` ( quoted path, optional extra qualification ). Qualified paths use the same path forms as imports, including import-root aliases such as `@/` — ["imports.rq".configuration_import_root_alias], ["../extension/language/comment-references/functional-code-comment-references.rq".comment_reference_import_root_alias]. Discovery skips quoted strings, including Rust raw strings ( `r#"…"#`, `r##"…"##`, `br#"…"#` ), so `rq:[…]` text in a string is not a live comment. Editor language coverage is a blocklist, not an allowlist: ["../extension/language/comment-references/functional-code-comment-references.rq".comment_reference_language_blocklist]. Indexed as `comment_link` by ["../indexer/indexer.rq".index_code_files]. Unresolved targets: [comment_reference_resolution_error]. Indexer listing: ["../core_analysis/core.rq".test_references]. Refactors: ["../extension/mutation/refactor_support.rq".comment_reference_refactor_support]. | 0.365 | |
| comments | done | Line comments use `//` through end of line ( hidden `SL_COMMENT` ). Block comments use `/* … */` and may span multiple lines ( hidden `ML_COMMENT` ). Meta comments on the same line after content are allowed ( `keep this // meta` ). Comments must not open inside a string / reference-string context: - Naked body quotes ( ["naked_strings_in_body"] ): a quoted slash-slash that is not a comment, quoted urls, `"../mod/**/*.rq"`. - Reference / import `STRING` paths ( `["…"]`, `from "…" import …` ) — the lexer consumes the whole quoted path as one `STRING`, so neither `//` nor `/*` inside the quotes starts a comment. Example: a file reference whose path text contains slash-slash, `["../extension/**/*.rq".*webview*]`. - URL / path-segment guard: `//` immediately after `:` or `/` is not a line comment. Same-line fences: ["./syntax-edge-cases.rq".fencing_comments] — complete `"…"`, `'…'`, and ` ` ` … ` ` ` spans keep ` Unclosed quote or backtick openers are not fences, so `//` after them is a comment. Comment-range identity across lexer, scanner, and TextMate: ["../core_analysis/rust_port.rq".comment_span_align]. Multiline / glob clash: the empty block form `/**/` is **not** a comment — it is the recursive glob segment used in paths such as `../mod/**/*.rq`. A real block comment needs a non-empty body ( `/* note */`, `/*\n note\n*/` ). The token builder rejects length-4 `/**/` matches; comment-span scanners skip the same sequence so embedded `rq:[…]` discovery stays aligned. Related: [comment_reference_ignore], [string_literals], ["./imports.rq".wildcard_references], ["../core_analysis/rust_port.rq".comment_span_align]. | 0.145 | |
| inline_code | done | Single-backtick spans ( `…` ) are opaque `INLINE_CODE`. They may show example syntax such as a quoted path plus idea. The grammar does not parse bracket or file references inside the span. Check and the language server must not report those examples as unresolved ["../reference_types.rq".file_reference] or idea refs. Related: [code_snippets], ["../core_analysis/rust_port.rq".comment_span_align]. | 0.165 | |
| markdown_links | done | Markdown `[label](target)` links are supported; the label is not treated as an idea reference. Example: testing requirements and the golden corpus. Related: ["../development/core.rq".testing], ["../core_analysis/rust_port.rq".golden_corpus]. | 0.055 | |
| reference_file | References may target arbitrary files, not only. rq files. File reference syntax uses a bracketed quoted path. A relative path resolves from the document directory. When that path climbs with `..` and the file is not there, the same path is tried from each ancestor directory up to the workspace folder. The document-directory file wins when it exists. Line or line-range references append `L#n` or `L#n-m` after the path inside the brackets. Test-name references append `:` and the test title after the path ( for example `./app.test.ts:lists items` ). The first `:` after the path starts the title; later `:` characters stay in the title ( `e2e: …` ). `://` and a Windows drive `C:` / `C:/` are part of the path, not a test suffix. Symbol references append a dot-separated symbol path after the quoted file path. Quoted body text is not a file reference: ["../reference_types.rq".reference_edgecase]. | 0.266 | ||
| string_and_reference_apostrophes | strings should use double or single apostrophes interchangeably and support backslash escapes. | 0.040 |
Reference labels
anonymous_imports_allowed, code_snippets, comment_reference, comments, fencing_comments, inline_code, markdown_links, reference_file, string_and_reference_apostrophes