Struct erg_compiler::lower::ASTLowerer
source · pub struct ASTLowerer { /* private fields */ }
Expand description
Checks & infers types of an AST, and convert (lower) it into a HIR
Implementations§
source§impl ASTLowerer
impl ASTLowerer
pub fn new_with_cache<S: Into<Str>>(
cfg: ErgConfig,
mod_name: S,
shared: SharedCompilerResource
) -> Self
pub fn pop_mod_ctx(&mut self) -> Option<ModuleContext>
pub fn pop_mod_ctx_or_default(&mut self) -> ModuleContext
pub fn get_mod_ctx(&self) -> &ModuleContext
pub fn dir(&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)>
source§impl ASTLowerer
impl ASTLowerer
pub fn lower(
&mut self,
ast: AST,
mode: &str
) -> Result<CompleteArtifact, IncompleteArtifact>
Trait Implementations§
source§impl ContextProvider for ASTLowerer
impl ContextProvider for ASTLowerer
source§impl Debug for ASTLowerer
impl Debug for ASTLowerer
source§impl Default for ASTLowerer
impl Default for ASTLowerer
source§impl Runnable for ASTLowerer
impl Runnable for ASTLowerer
type Err = CompileError
type Errs = CompileErrors
const NAME: &'static str = "Erg lowerer"
fn cfg(&self) -> &ErgConfig
fn cfg_mut(&mut self) -> &mut ErgConfig
fn new(cfg: ErgConfig) -> Self
fn finish(&mut self)
source§fn initialize(&mut self)
fn initialize(&mut self)
Erase all but immutable information.