mirror of
https://github.com/erg-lang/erg.git
synced 2025-08-04 18:58:30 +00:00
chore: add debug-mode assertions
This commit is contained in:
parent
fd74117c50
commit
6cc4e19827
3 changed files with 17 additions and 2 deletions
|
@ -21,7 +21,7 @@ use crate::varinfo::VarInfo;
|
|||
/// Summarize lowering, side-effect checking, and ownership checking
|
||||
#[derive(Debug)]
|
||||
pub struct HIRBuilder {
|
||||
lowerer: ASTLowerer,
|
||||
pub(crate) lowerer: ASTLowerer,
|
||||
ownership_checker: OwnershipChecker,
|
||||
}
|
||||
|
||||
|
@ -207,4 +207,8 @@ impl HIRBuilder {
|
|||
pub fn get_var_info(&self, name: &str) -> Option<(&VarName, &VarInfo)> {
|
||||
ContextProvider::get_var_info(self, name)
|
||||
}
|
||||
|
||||
pub fn current_ctx(&self) -> &Context {
|
||||
&self.lowerer.module.context
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue