Struct erg_compiler::build_hir::HIRBuilder
source · pub struct HIRBuilder { /* 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 HIRBuilder
impl HIRBuilder
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 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
Trait Implementations§
source§impl BuildRunnable for HIRBuilder
impl BuildRunnable for HIRBuilder
fn build_module(&mut self) -> Result<CompleteArtifact<T>, IncompleteArtifact<T>>
source§impl Buildable for HIRBuilder
impl Buildable for HIRBuilder
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 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.
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 !RefUnwindSafe for HIRBuilder
impl Send for HIRBuilder
impl Sync for HIRBuilder
impl Unpin for HIRBuilder
impl !UnwindSafe for HIRBuilder
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