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,
mod_cache: SharedModuleCache,
py_mod_cache: SharedModuleCache
) -> 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<Context>
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 build(
&mut self,
src: String,
mode: &str
) -> Result<CompleteArtifact, IncompleteArtifact>
fn pop_context(&mut self) -> Option<Context>
fn get_context(&self) -> Option<&Context>
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§fn default() -> HIRBuilder
fn default() -> HIRBuilder
Returns the “default value” for a type. Read more
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.