Struct erg_compiler::transpile::Transpiler
source · pub struct Transpiler {
pub cfg: ErgConfig,
/* private fields */
}
Expand description
Generates a PyScript
from an String or other File inputs.
Fields§
§cfg: ErgConfig
Implementations§
source§impl Transpiler
impl Transpiler
pub fn transpile(
&mut self,
src: String,
mode: &str
) -> Result<CompleteArtifact<PyScript>, ErrorArtifact>
pub fn pop_mod_ctx(&mut self) -> Option<Context>
pub fn dir(&mut 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)>
Trait Implementations§
source§impl Buildable<PyScript> for Transpiler
impl Buildable<PyScript> for Transpiler
fn build(
&mut self,
src: String,
mode: &str
) -> Result<CompleteArtifact<PyScript>, IncompleteArtifact<PyScript>>
fn pop_context(&mut self) -> Option<Context>
fn get_context(&self) -> Option<&Context>
source§impl ContextProvider for Transpiler
impl ContextProvider for Transpiler
source§impl Debug for Transpiler
impl Debug for Transpiler
source§impl Default for Transpiler
impl Default for Transpiler
source§fn default() -> Transpiler
fn default() -> Transpiler
Returns the “default value” for a type. Read more
source§impl Runnable for Transpiler
impl Runnable for Transpiler
type Err = CompileError
type Errs = CompileErrors
const NAME: &'static str = "Erg transpiler"
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.