Printable idea sheet
same_line_named_block_highlighting
reqlan rq/extension/language/syntax/features-syntax-highlighting.rq:243
Katz 0.052
TextMate-only highlighting ( no semantic tokens ) must follow the canonical lexer for
named `{` / `}`: a top-level `name {}` or `name {hello}` is a complete
block_idea on that line. The grammar must close on the same line. It must not leave a block
open until a later own-line `}`. An open block swallows later one-liners such as
a name-only idea.
`name {` at end of line is a multiline block. Close it only on an own-line `}` so
matching prose pairs at end of line ( `{{SITE_URL}}` ) stay in the body per
nested_curly_braces.
`name text {braces}` is a simple_idea. `{` after other body text must not start a block.
TextMate idea-name scopes on a file must match the Langium parse of that file.
- implementation
- patch-textmate.mjs, reqlan.tmLanguage.json
- status
- done
- tests
- textmate-idea-highlight.test.ts, textmate-idea-highlight.test.ts:same-line named block rule closes on the opening line, textmate-idea-highlight.test.ts:e2e: same-line named braces do not swallow later ideas, textmate-idea-highlight.test.ts:e2e: TextMate idea names match the Langium parse, parsing.test.ts:same-line braces after a name parse as a block
Interactive page: same_line_named_block_highlighting