Struct sixtyfps_compilerlib::typeloader::TypeLoader
source · [−]pub struct TypeLoader<'a> {
pub global_type_registry: Rc<RefCell<TypeRegister>>,
pub compiler_config: &'a CompilerConfiguration,
/* private fields */
}
Fields
global_type_registry: Rc<RefCell<TypeRegister>>
compiler_config: &'a CompilerConfiguration
Implementations
pub fn new(
global_type_registry: Rc<RefCell<TypeRegister>>,
compiler_config: &'a CompilerConfiguration,
diag: &mut BuildDiagnostics
) -> Self
pub async fn load_dependencies_recursively(
&mut self,
doc: &Document,
diagnostics: &mut BuildDiagnostics,
registry_to_populate: &Rc<RefCell<TypeRegister>>
) -> Vec<ImportedTypes>
pub async fn load_dependencies_recursively(
&mut self,
doc: &Document,
diagnostics: &mut BuildDiagnostics,
registry_to_populate: &Rc<RefCell<TypeRegister>>
) -> Vec<ImportedTypes>
Imports of files that don’t have the .60 extension are returned.
pub async fn import_type(
&mut self,
file_to_import: &str,
type_name: &str,
diagnostics: &mut BuildDiagnostics
) -> Option<Type>
pub fn resolve_import_path(
&self,
import_token: Option<&NodeOrToken>,
maybe_relative_path_or_url: &str
) -> (PathBuf, Option<&'static [u8]>)
pub fn resolve_import_path(
&self,
import_token: Option<&NodeOrToken>,
maybe_relative_path_or_url: &str
) -> (PathBuf, Option<&'static [u8]>)
Append a possibly relative path to a base path. Returns the data if it resolves to a built-in (compiled-in) file.
Load a file, and its dependency not run the passes.
the path must be the canonical path
Lookup a filename and try to find the absolute filename based on the include path or the current file directory
Return a document if it was already loaded
Return an iterator over all the loaded file path
Returns an iterator over all the loaded documents