Struct lc3_ensemble::ast::Label
source · pub struct Label {
pub name: String,
/* private fields */
}Expand description
A label.
This struct stores the name of the label (accessible by the name field)
and the source code span indicating where the label is located in assembly source code.
§Examples
.orig x3000
AND R0, R0, #0
LD R2, VALUE
~~~~~
LOOP:
~~~~
NOT R1, R2
ADD R1, R1, #1
ADD R1, R1, R0
BRz END
~~~
ADD R0, R0, #1
BR LOOP
~~~~
END: HALT
~~~
VALUE: .fill #8464
~~~~~
.end
Fields§
§name: StringThe label’s identifier
Implementations§
Trait Implementations§
source§impl PartialEq for Label
impl PartialEq for Label
source§impl TokenParse for Label
impl TokenParse for Label
impl Eq for Label
impl StructuralPartialEq for Label
Auto Trait Implementations§
impl Freeze for Label
impl RefUnwindSafe for Label
impl Send for Label
impl Sync for Label
impl Unpin for Label
impl UnwindSafe for Label
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit)