Crate erg_compiler

source ·
Expand description

defines the compiler for Erg (ergc).


pub extern crate erg_parser;
pub use build_hir::HIRBuilder;
pub use transpile::Transpiler;


Defines Context.
implements SideEffectChecker SideEffectCheckerを実装 関数や不変型に副作用がないかチェックする
implements ASTLowerer.
defines Type (type kind).


feature_error!($Strc: struct, ctx: Context, loc: Location, name: &str)
unreachable!(self: Context)


Summarize parsing and desugaring
Generates a CodeObj from an String or other File inputs.


  • registered as global -> Global
  • defined in the toplevel scope (and called in the inner scope) -> Global
  • defined and called in the toplevel scope -> Local
  • not defined in the toplevel and called in the inner scope -> Deref
  • defined and called in the current scope (except the toplevel) -> Fast