Referenced by 7
Labels 3

Referencing ideas

IdeaStatusTagsSummary
grammar_and_parser Grammar is Langium ( Chevrotain ), not tree-sitter. Main `.rq` grammar: [reqlan_grammar]. Comment-token grammar for `rq:[…]` in non- `.rq` sources: [comment_grammar]. `langium generate` produces AST / grammar modules and TextMate JSON; TextMate is patched and copied into the extension at build time per [development_build.build_prepare]. Syntax requirements that the grammar must satisfy live in [syntax]; conceptual units in [ontology.idea], [ontology.ideaset], [ontology.reference], [ontology.import_statement]. Services are wired in [language_module].
scope These requirements describe the cross-package system architecture of the reqlan monorepo: language definition, language server, ideas index, editor product, and companion tools. They are distinct from [extension_scope.scope], which bounds only the VS Code extension and LSP product surface. Language concepts live in [ontology]; syntax truth lives in [syntax]; editor module contracts live under extension / module. Grouped as [workspace_packages], [language_runtime], and [product_map].
import_error_recovery A malformed import must not invalidate the rest of the file. Recoverable invalid `from` shapes parse as local import nodes with a line-level diagnostic: - `from "path" as alias` ( mistaken namespace form ) — suggest `import "path" as alias` or `from "path" import <idea>` - bare `from "path"` — require the `import <idea>` clause - `from` without a quoted path — consume the remainder of the line as an invalid import Later imports and top-level ideas continue to parse and link normally. Same recovery posture for nameless top-level braces: ["./syntax.rq".no_name_idea_safe_warning]. If lex / parse never completes, see ["./parser_lexer.rq".parse_budget_timeout].
import_keywords The keywords import, from, and as are reserved for import statements. Import keywords may also appear as ordinary words in idea body text when not at statement start.
import_tokenisation if an import is given an alias, then the base name is still available as a variable name and should not cause a conflict. Only the alias binds in the importing file; the imported idea's base name may be reused for a local idea. e. g. The same rule applies to qualified imports with `as`. Unaliased imports still bind the idea name and conflict with a local idea of that name. Related: ["../extension/syntax/features-syntax.rq".sensible_alias_support].
file_suffix Reqlan requirement documents use the . rq file suffix .
no_name_idea_safe_warning done A top-level nameless curly-brace block — `{... }` with no idea name — must not take down the parser or the language server workspace. Parse the block as a recoverable anonymous top-level element, emit a descriptive warning that a name is required before `{`, and continue so later ideas, imports, and links still work. Nameless blocks inside parenthesized lists remain valid list items per [lists]; only top-level nameless blocks warn. Related recovery posture: ["./imports.rq".import_error_recovery]. Block shape: [block_idea]. Fenced examples must stay opaque per [code_snippets] so braces inside snippets cannot desync structural depth. Non-termination ( lex / parse never finishes ) is a different failure mode: ["./parser_lexer.rq".parse_budget_timeout].

Reference labels

../../packages/language/src/reqlan.langium, ../packages/language/src/reqlan.langium, reqlan_grammar