Struct erg_compiler::lower::ASTLowerer
source · [−]pub struct ASTLowerer { /* private fields */ }
Expand description
Singleton that checks types of an AST, and convert (lower) it into a HIR
Implementations
sourceimpl ASTLowerer
impl ASTLowerer
pub fn new_with_cache<S: Into<Str>>(
cfg: ErgConfig,
mod_name: S,
mod_cache: SharedModuleCache,
py_mod_cache: SharedModuleCache
) -> Self
pub fn lower(
&mut self,
ast: AST,
mode: &str
) -> Result<(HIR, LowerWarnings), (Option<HIR>, LowerErrors)>
Trait Implementations
sourceimpl Debug for ASTLowerer
impl Debug for ASTLowerer
sourceimpl Default for ASTLowerer
impl Default for ASTLowerer
sourceimpl Runnable for ASTLowerer
impl Runnable for ASTLowerer
type Err = CompileError
type Errs = CompileErrors
const NAME: &'static str = "Erg lowerer"
fn cfg(&self) -> &ErgConfig
fn new(cfg: ErgConfig) -> Self
fn finish(&mut self)
fn clear(&mut self)
fn exec(&mut self) -> Result<i32, Self::Errs>
fn eval(&mut self, src: String) -> Result<String, Self::Errs>
fn input(&self) -> &Input
fn start_message(&self) -> String
fn ps1(&self) -> String
fn ps2(&self) -> String
fn quit(&self, code: i32)
fn run(cfg: ErgConfig)
Auto Trait Implementations
impl !RefUnwindSafe for ASTLowerer
impl !Send for ASTLowerer
impl !Sync for ASTLowerer
impl Unpin for ASTLowerer
impl !UnwindSafe for ASTLowerer
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more