reqlanOverviewIdeasFilesCode filesClustersAttributesGraphPrint

Printable idea sheet

import_from

reqlan rq/language/imports.rq:8

Katz 0.220

From-import syntax uses from, a quoted path, import, and an idea name.
From-import may list more than one idea. Separate the names with commas.
From-import may include an alias using as.
The parser records a span for the path, each idea name, and each alias.
Each of those tokens is its own document link.
The path links to the file.
An idea name links to that declaration.
An alias links to the same declaration.
When the alias contains the imported idea name, Ctrl + click on a bracket reference still treats the whole alias as one link.
See aliased_from_import_ctrl_click.
The language server uses the parser spans: language_server_rust.

example
```
from "@/links-to-file.rq" import ishouldlink, ishouldbeasecondlink as ishouldbeathirdvalidlink
```
implementation
parser.rs, ast.rs, analysis.rs
tests
parsing.test.ts:parses from-import example line inside an attribute block value, local-symbolic-links.test.ts:aliased from-import whose name contains the imported idea is one link, parser.rs:from_import_records_each_token_span, parity.rs:from_import_tokens_link_independently

Interactive page: import_from