Struct mcvm_parse::parse::Parsed
source · pub struct Parsed {
pub blocks: HashMap<BlockId, Block>,
pub routines: HashMap<String, BlockId>,
/* private fields */
}Expand description
The final result of parsed data
Fields§
§blocks: HashMap<BlockId, Block>The blocks of instructions that have been parsed
routines: HashMap<String, BlockId>A map of routine names to the blocks they contain
Implementations§
source§impl Parsed
impl Parsed
sourcepub fn new_block(&mut self, parent: Option<BlockId>) -> BlockId
pub fn new_block(&mut self, parent: Option<BlockId>) -> BlockId
Creates a new block and returns its ID
sourcepub fn new_routine(&mut self, name: &str) -> BlockId
pub fn new_routine(&mut self, name: &str) -> BlockId
Creates a new routine and its associated block, then returns the block’s ID
sourcepub fn routine_exists(&self, name: &str) -> bool
pub fn routine_exists(&self, name: &str) -> bool
Checks if a routine exists
Trait Implementations§
Auto Trait Implementations§
impl RefUnwindSafe for Parsed
impl Send for Parsed
impl Sync for Parsed
impl Unpin for Parsed
impl UnwindSafe for Parsed
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