Function discover_with_imports
pub fn discover_with_imports(
file_path: &Path,
source: &str,
loader: &mut Loader,
interner: &mut Interner,
) -> Result<TypeRegistry, String>Expand description
Recursive discovery with module imports.
Scans a LOGOS source file for:
- Dependencies declared in the Abstract (Markdown links)
- Type definitions in
## Definitionblocks
§Namespace Prefixing
Dependencies are loaded recursively, and their types are merged into
the registry with namespace prefixes (e.g., Geometry::Point).
§Arguments
file_path- Path to the source filesource- Source code contentloader- Module loader for resolving importsinterner- Symbol interner
§Example
let mut loader = Loader::new(root_path);
let registry = discover_with_imports(
Path::new("main.md"),
source,
&mut loader,
&mut interner
)?;
// registry now contains types from main.md and all imports