Struct phoenix_lang::chunk::CompilerModuleChunk
source · pub struct CompilerModuleChunk {Show 13 fields
pub name: String,
pub main: bool,
pub chunk: Chunk,
pub scanner: Scanner,
pub tokens: Vec<Token>,
pub constants: Vec<Value>,
pub functions: Vec<FunctionChunk>,
pub classes: Vec<ClassChunk>,
pub current_class: Option<usize>,
pub parent_functions: Vec<usize>,
pub resolver: Resolver,
pub identifier_constants: Vec<String>,
pub has_init: bool,
/* private fields */
}
Expand description
Compile time repr of an imported module
Fields§
§name: String
The name of the module
main: bool
Whether or not this is the main module
chunk: Chunk
The chunk of code for the module
scanner: Scanner
§tokens: Vec<Token>
§constants: Vec<Value>
§functions: Vec<FunctionChunk>
§classes: Vec<ClassChunk>
§current_class: Option<usize>
§parent_functions: Vec<usize>
Which FunctionChunk should the the compiler return to after. Acts as a stack
resolver: Resolver
Manages the slots for the local variables and upvalues, represented as a Vec of individual ResolverNodes
identifier_constants: Vec<String>
§has_init: bool
Implementations§
Trait Implementations§
source§impl Clone for CompilerModuleChunk
impl Clone for CompilerModuleChunk
source§fn clone(&self) -> CompilerModuleChunk
fn clone(&self) -> CompilerModuleChunk
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl RefUnwindSafe for CompilerModuleChunk
impl Send for CompilerModuleChunk
impl Sync for CompilerModuleChunk
impl Unpin for CompilerModuleChunk
impl UnwindSafe for CompilerModuleChunk
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