reqlanOverviewIdeasFilesCode filesClustersAttributesGraphPrint

Printable idea sheet

import_statement_highlighting

reqlan rq/extension/language/syntax/features-syntax-highlighting.rq:20

Katz 0.064

TextMate highlighting for import lines must colour the whole statement, not only the leading
`from` / `import` keyword. After `import` ( and after `from` … `import` ), the quoted path,
the `import` / `as` keywords, and idea / alias names must receive scopes — they must not stay
default-white while still looking interactive from a path document link alone.
Root cause: a short `^\\b(from|import)\\b` match ran before the path patterns and consumed the
keyword so the path never scoped.
Fix: line-scoped `meta.import.reqlan` begin / end rules that paint path, keywords, and names.
Semantic tokens still paint import AST nodes ( and must `return` after handling them ).

implementation
patch-textmate.mjs, reqlan.tmLanguage.json, reqlan-semantic-token-provider.ts
status
done
tests
textmate-import-highlight.test.ts, textmate-import-highlight.test.ts:e2e: from-import line scopes path and import keyword, textmate-import-highlight.test.ts:e2e: namespace import line scopes path and as

Interactive page: import_statement_highlighting