Struct erg_compiler::build_hir::HIRBuilder
source · pub struct HIRBuilder { /* private fields */ }
Expand description
Summarize lowering, side-effect checking, and ownership checking
Implementations§
source§impl HIRBuilder
impl HIRBuilder
pub fn new_with_cache<S: Into<Str>>(
cfg: ErgConfig,
mod_name: S,
shared: SharedCompilerResource
) -> 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 pop_mod_ctx(&mut self) -> Option<ModuleContext>
pub fn dir(&mut self) -> Vec<(&VarName, &VarInfo)>
pub fn get_receiver_ctx(&self, receiver_name: &str) -> Option<&Context>
pub fn get_var_info(&self, name: &str) -> Option<(&VarName, &VarInfo)>
Trait Implementations§
source§impl Buildable<HIR> for HIRBuilder
impl Buildable<HIR> for HIRBuilder
fn inherit(cfg: ErgConfig, shared: SharedCompilerResource) -> Self
fn build(
&mut self,
src: String,
mode: &str
) -> Result<CompleteArtifact, IncompleteArtifact>
fn pop_context(&mut self) -> Option<ModuleContext>
fn get_context(&self) -> Option<&ModuleContext>
source§impl ContextProvider for HIRBuilder
impl ContextProvider for HIRBuilder
source§impl Debug for HIRBuilder
impl Debug for HIRBuilder
source§impl Default for HIRBuilder
impl Default for HIRBuilder
source§impl Runnable for HIRBuilder
impl Runnable for HIRBuilder
type Err = CompileError
type Errs = CompileErrors
const NAME: &'static str = "Erg HIR builder"
fn new(cfg: ErgConfig) -> Self
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.