pub struct Resolver { /* private fields */ }Expand description
Resolver for include statements
Implementations§
Source§impl Resolver
impl Resolver
Sourcepub fn new(stdlib_path: Option<PathBuf>) -> Self
pub fn new(stdlib_path: Option<PathBuf>) -> Self
Create a new resolver with an optional stdlib path for filesystem fallback
Sourcepub fn resolve(
&mut self,
source_path: &Path,
program: Program,
) -> Result<ResolveResult, String>
pub fn resolve( &mut self, source_path: &Path, program: Program, ) -> Result<ResolveResult, String>
Resolve all includes in a program and return a merged program with FFI includes
Takes the source file path and its already-parsed program. Recursively resolves includes and merges all word and union definitions. FFI includes are collected but not processed (they don’t produce words/unions).
Auto Trait Implementations§
impl Freeze for Resolver
impl RefUnwindSafe for Resolver
impl Send for Resolver
impl Sync for Resolver
impl Unpin for Resolver
impl UnsafeUnpin for Resolver
impl UnwindSafe for Resolver
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more