Struct sixtyfps_compilerlib::typeloader::TypeLoader [−][src]
pub struct TypeLoader<'a> {
pub global_type_registry: Rc<RefCell<TypeRegister>>,
pub compiler_config: &'a CompilerConfiguration,
pub builtin_library: Option<&'a VirtualDirectory<'a>>,
// some fields omitted
}Fields
global_type_registry: Rc<RefCell<TypeRegister>>compiler_config: &'a CompilerConfigurationbuiltin_library: Option<&'a VirtualDirectory<'a>>Implementations
impl<'a> TypeLoader<'a>[src]
impl<'a> TypeLoader<'a>[src]pub fn new(
global_type_registry: Rc<RefCell<TypeRegister>>,
compiler_config: &'a CompilerConfiguration,
diag: &mut BuildDiagnostics
) -> Self[src]
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>[src]
&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>[src]
&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<&str>)[src]
&self,
import_token: Option<&NodeOrToken>,
maybe_relative_path_or_url: &str
) -> (PathBuf, Option<&str>)
Append a possibly relative path to a base path. Returns the data if it resolves to a built-in (compiled-in) file.
pub async fn load_file(
&mut self,
path: &Path,
source_path: &Path,
source_code: String,
diagnostics: &mut BuildDiagnostics
)[src]
&mut self,
path: &Path,
source_path: &Path,
source_code: String,
diagnostics: &mut BuildDiagnostics
)
Load a file, and its dependency not run the passes.
the path must be the canonical path
pub fn get_document<'b>(&'b self, path: &Path) -> Option<&'b Document>[src]
Return a document if it was already loaded
pub fn all_files<'b>(&'b self) -> impl Iterator<Item = &PathBuf> + 'b[src]
Return an iterator over all the loaded file path
pub fn all_documents(&self) -> impl Iterator<Item = &Document> + '_[src]
Returns an iterator over all the loaded documents
Auto Trait Implementations
impl<'a> !RefUnwindSafe for TypeLoader<'a>
impl<'a> !RefUnwindSafe for TypeLoader<'a>impl<'a> !Send for TypeLoader<'a>
impl<'a> !Send for TypeLoader<'a>impl<'a> !Sync for TypeLoader<'a>
impl<'a> !Sync for TypeLoader<'a>impl<'a> Unpin for TypeLoader<'a>
impl<'a> Unpin for TypeLoader<'a>impl<'a> !UnwindSafe for TypeLoader<'a>
impl<'a> !UnwindSafe for TypeLoader<'a>