Module resolve

Module resolve 

Source
Expand description

Single symbol resolving

After parsing a source file (see crate::parse) it must be resolved to get a symbol out of it:

use microcad_lang::{syntax::*, parse::*, resolve::*, diag::*};
let source_file = SourceFile::load("my.µcad").expect("parsing success");
let mut context = ResolveContext::create(
    source_file,
    &["./lib"],
    None,
    DiagHandler::default(),
).unwrap();

To “run” the source file (and get the expected output) it must now be evaluated (see crate::eval) .

Structs§

Externals
External files register.
ParameterInfo
Single parameter information ion human readable form.
ResolveContext
Resolve Context
SignatureInfo
Call signature information in human readable form.
Sources
Register of loaded source files and their syntax trees.
Symbol
Symbol
SymbolInfo
Symbol information in human readable form.
SymbolTable
Symbol table holding global symbols.

Enums§

LookupTarget
Target of symbol to look up.
ResolveError
Resolve error.
ResolveMode
Select what {ResolveContext::create()] automatically does.
SymbolDef
Symbol definition

Traits§

FullyQualify
Trait for items which can be fully qualified.
GetSourceByHash
Trait that can fetch for a file by it’s hash value.
Info
Retrieve symbol information.
Lookup
Trait to lookup symbols by qualified name.

Functions§

find_mod_file_by_id
Find a module file by path and id.

Type Aliases§

ResolveResult
Result type of any resolve.