Printable idea sheet
comment_span_align
reqlan rq/core_analysis/rust_port.rq:104
Katz 0.141
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, code_snippets, comments, fencing_comments, inline_code.
- implementation
- reqlan-token-builder.ts, reqlan-comment-resolver.ts, reqlan-line-fences.ts, patch-textmate.mjs, reqlan.tmLanguage.json, lexer.rs
- status
- done
- tests
- comment-span-align.test.ts:golden corpus C-style comment ranges match lexer, scanner, and TextMate, * is not a block comment, comment-span-align.test.ts:TextMate line-fences run before comments, comment-span-align.test.ts:mid-line triple backticks are not a fence, comment-span-align.test.ts:line-start triple backticks lex as CODE_FENCE and hide inner comments, comment-span-align.test.ts:TextMate code-snippets fences are line-start only, * in block body is not a block comment, * inside complete backtick fences, references.test.ts:findCommentSpansInText does not treat mid-line ``` as a fence, parsing.test.ts:keeps later ideas after mid-line triple backticks, parsing.test.ts:parse rust_port.rq keeps ideas after comment_span_align fence prose, lexer.rs:backticked_slash_star_is_not_a_comment, lexer.rs:mid_line_triple_backticks_are_not_a_code_fence, parser.rs:keeps_ideas_after_mid_line_triple_backticks
Interactive page: comment_span_align