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, wait_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, wait: bool, ) -> Option<CompilationResult>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Compiler
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