Struct phoenix_lang::compiler::Compiler
source · pub struct Compiler { /* private fields */ }
Implementations§
source§impl Compiler
impl Compiler
pub fn current_module(&mut self) -> &mut CompilerModuleChunk
pub fn current_code_module(&mut self) -> &mut CompilerModuleChunk
pub fn set_current_module(&mut self, m: CompilerModuleChunk)
sourcepub fn identifier_constant_module(
&mut self,
str_val: &String,
module: usize
) -> usize
pub fn identifier_constant_module( &mut self, str_val: &String, module: usize ) -> usize
Add a string to the chunk as a constant and return the index
Only used for global variables
pub fn new_default(code: String, quiet: bool, start_line: usize) -> Compiler
👎Deprecated: Use new instead
pub fn new_file( file: String, code: String, quiet: bool, start_line: usize, debug_mode: bool ) -> Compiler
sourcepub fn new_start(
&mut self,
file: String,
code: String,
quiet: bool,
start_line: usize,
start_pos: usize
)
pub fn new_start( &mut self, file: String, code: String, quiet: bool, start_line: usize, start_pos: usize )
whether it had an error
pub fn compile(&mut self, debug: bool) -> Option<CompilationResult>
pub fn compile_code(code: String, debug: bool) -> Option<CompilationResult>
Trait Implementations§
Auto Trait Implementations§
impl RefUnwindSafe for Compiler
impl Send for Compiler
impl Sync for Compiler
impl Unpin for Compiler
impl UnwindSafe for Compiler
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