pub struct Xasm {
pub vars: Vec<Vars>,
pub mut_vars: Vec<MutVars>,
pub funcs: Vec<Func>,
pub tokens: Vec<Tokens>,
}Expand description
Xasm is the main struct used to generate assembly code.
Xasm holds all the information needed to generate assembly code. It contains information about variables, functions, and tokens.
The information is stored in the following fields:
vars- A vector ofVars, which represents variables declared in the source code.mut_vars- A vector ofMutVars, which represents mutable variables declared in the source code.funcs- A vector ofFunc, which represents functions declared in the source code.tokens- A vector ofTokens, which represents tokens declared in the source code.
To generate assembly code, the genasm function should be called.
The genasm function takes a Xasm object and an OsConfig object as arguments,
and returns a string representing the assembly code.
Fields§
§vars: Vec<Vars>§mut_vars: Vec<MutVars>§funcs: Vec<Func>§tokens: Vec<Tokens>Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Xasm
impl RefUnwindSafe for Xasm
impl Send for Xasm
impl Sync for Xasm
impl Unpin for Xasm
impl UnwindSafe for Xasm
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