std/jule/importer
Index
struct CompileInfo
struct Importer
static fn New(info: CompileInfo): &Importer
fn AllPackages(mut self): []&sema::ImportInfo
fn SetModPath(mut self, path: str)
fn GetModPath(self): str
fn ModById(self, id: int): str
fn GetImport(mut self, path: str): &sema::ImportInfo
fn ImportPackage(mut self, path: str, updateMod: bool): ([]&ast::AST, []build::Log)
fn Imported(mut self, mut imp: &sema::ImportInfo)
enum Compiler
enum CppStd
CompileInfo
struct CompileInfo {
// Production compilation.
Prod: bool
// Test compilation.
Test: bool
// Back-end compiler to use.
Compiler: Compiler
// C++ standard to use.
CppStd: CppStd
}
Compile information.
Importer
struct Importer {
// NOTE: contains filtered hidden or unexported fields
}
Default importer for the reference Jule compiler.
Implemented Traits
sema::Importer
New
static fn New(info: CompileInfo): &Importer
Returns new importer instance by compile information.
AllPackages
fn AllPackages(mut self): []&sema::ImportInfo
Returns all imported packages. The return value is mutable reference to internal buffer. You should be care about using that copy.
SetModPath
fn SetModPath(mut self, path: str)
GetModPath
fn GetModPath(self): str
ModById
fn ModById(self, id: int): str
GetImport
fn GetImport(mut self, path: str): &sema::ImportInfo
ImportPackage
fn ImportPackage(mut self, path: str, updateMod: bool): ([]&ast::AST, []build::Log)
avoid case sensitivity for fair comparison
Imported
fn Imported(mut self, mut imp: &sema::ImportInfo)
Skip file if can't pass build directives.
Compiler
enum Compiler: str {
Clang: "clang",
GCC: "gcc",
}
Standard back-end compilers.
CppStd
enum CppStd: str {
Cpp14: "cpp14",
Cpp17: "cpp17",
Cpp20: "cpp20",
}
Supported C++ standards.