Struct erg_compiler::build_hir::GenericHIRBuilder
source · pub struct GenericHIRBuilder<ASTBuilder: ASTBuildable = ASTBuilder> { /* private fields */ }
Expand description
Summarize lowering, side-effect checking, and ownership checking
NOTE: This does not perform dependency resolution, use PackageBuilder
to build a package
Implementations§
source§impl<ASTBuilder: ASTBuildable> GenericHIRBuilder<ASTBuilder>
impl<ASTBuilder: ASTBuildable> GenericHIRBuilder<ASTBuilder>
pub fn new(cfg: ErgConfig) -> Self
pub fn new_with_cache<S: Into<Str>>( cfg: ErgConfig, mod_name: S, shared: SharedCompilerResource ) -> Self
pub fn new_with_ctx(mod_ctx: ModuleContext) -> Self
pub fn new_submodule(mod_ctx: ModuleContext, name: &str) -> Self
pub fn check( &mut self, ast: AST, mode: &str ) -> Result<CompleteArtifact, IncompleteArtifact>
pub fn build( &mut self, src: String, mode: &str ) -> Result<CompleteArtifact, IncompleteArtifact>
pub fn build_module(&mut self) -> Result<CompleteArtifact, IncompleteArtifact>
pub fn build_linked_module( &mut self ) -> Result<CompleteArtifact, IncompleteArtifact>
pub fn pop_mod_ctx(&mut self) -> Option<ModuleContext>
pub fn dir(&mut self) -> Dict<&VarName, &VarInfo>
pub fn get_receiver_ctx(&self, receiver_name: &str) -> Option<&Context>
pub fn get_var_info(&self, name: &str) -> Option<(&VarName, &VarInfo)>
pub fn current_ctx(&self) -> &Context
pub fn clear(&mut self)
Trait Implementations§
source§impl<ASTBuilder: ASTBuildable + 'static> BuildRunnable for GenericHIRBuilder<ASTBuilder>
impl<ASTBuilder: ASTBuildable + 'static> BuildRunnable for GenericHIRBuilder<ASTBuilder>
fn build_module(&mut self) -> Result<CompleteArtifact<T>, IncompleteArtifact<T>>
source§impl<ASTBuilder: ASTBuildable> Buildable for GenericHIRBuilder<ASTBuilder>
impl<ASTBuilder: ASTBuildable> Buildable for GenericHIRBuilder<ASTBuilder>
fn inherit(cfg: ErgConfig, shared: SharedCompilerResource) -> Self
fn inherit_with_name( cfg: ErgConfig, mod_name: Str, shared: SharedCompilerResource ) -> Self
fn build( &mut self, src: String, mode: &str ) -> Result<CompleteArtifact, IncompleteArtifact>
fn build_from_ast( &mut self, ast: AST, mode: &str ) -> Result<CompleteArtifact<HIR>, IncompleteArtifact<HIR>>
fn pop_context(&mut self) -> Option<ModuleContext>
fn get_context(&self) -> Option<&ModuleContext>
source§impl<ASTBuilder: ASTBuildable> ContextProvider for GenericHIRBuilder<ASTBuilder>
impl<ASTBuilder: ASTBuildable> ContextProvider for GenericHIRBuilder<ASTBuilder>
source§impl<ASTBuilder: Debug + ASTBuildable> Debug for GenericHIRBuilder<ASTBuilder>
impl<ASTBuilder: Debug + ASTBuildable> Debug for GenericHIRBuilder<ASTBuilder>
source§impl<ASTBuilder: ASTBuildable> Default for GenericHIRBuilder<ASTBuilder>
impl<ASTBuilder: ASTBuildable> Default for GenericHIRBuilder<ASTBuilder>
source§impl<A: ASTBuildable> New for GenericHIRBuilder<A>
impl<A: ASTBuildable> New for GenericHIRBuilder<A>
source§impl<ASTBuilder: ASTBuildable> Runnable for GenericHIRBuilder<ASTBuilder>
impl<ASTBuilder: ASTBuildable> Runnable for GenericHIRBuilder<ASTBuilder>
type Err = CompileError
type Errs = CompileErrors
const NAME: &'static str = "Erg HIR builder"
fn cfg(&self) -> &ErgConfig
fn cfg_mut(&mut self) -> &mut ErgConfig
fn finish(&mut self)
source§fn initialize(&mut self)
fn initialize(&mut self)
Erase all but immutable information.
fn exec(&mut self) -> Result<ExitStatus, Self::Errs>
fn eval(&mut self, src: String) -> Result<String, Self::Errs>
fn expect_block(&self, src: &str) -> BlockKind
fn input(&self) -> &Input
fn set_input(&mut self, input: Input)
fn start_message(&self) -> String
fn ps1(&self) -> String
fn ps2(&self) -> String
fn quit(&mut self, code: i32) -> !
fn quit_successfully(&mut self, output: BufWriter<StdoutLock<'_>>) -> !
fn run(cfg: ErgConfig) -> ExitStatus
Auto Trait Implementations§
impl<ASTBuilder = ASTBuilder> !Freeze for GenericHIRBuilder<ASTBuilder>
impl<ASTBuilder = ASTBuilder> !RefUnwindSafe for GenericHIRBuilder<ASTBuilder>
impl<ASTBuilder> Send for GenericHIRBuilder<ASTBuilder>
impl<ASTBuilder> Sync for GenericHIRBuilder<ASTBuilder>
impl<ASTBuilder> Unpin for GenericHIRBuilder<ASTBuilder>
impl<ASTBuilder = ASTBuilder> !UnwindSafe for GenericHIRBuilder<ASTBuilder>
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