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.
- Parameter
Info - Single parameter information ion human readable form.
- Resolve
Context - Resolve Context
- Signature
Info - Call signature information in human readable form.
- Sources
- Register of loaded source files and their syntax trees.
- Symbol
- Symbol
- Symbol
Info - Symbol information in human readable form.
- Symbol
Table - Symbol table holding global symbols.
Enums§
- Lookup
Target - Target of symbol to look up.
- Resolve
Error - Resolve error.
- Resolve
Mode - Select what {ResolveContext::create()] automatically does.
- Symbol
Def - Symbol definition
Traits§
- Fully
Qualify - Trait for items which can be fully qualified.
- GetSource
ByHash - 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§
- Resolve
Result - Result type of any resolve.