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: String
The label’s identifier
Implementations§
Trait Implementations§
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§impl<S> Parse for Swhere
S: TokenParse,
impl<S> Parse for Swhere
S: TokenParse,
Source§impl<T> TokenParse for Twhere
T: DirectTokenParse,
impl<T> TokenParse for Twhere
T: DirectTokenParse,
Source§type Intermediate = T
type Intermediate = T
An intermediate to hold the match before it is converted to the actual component.
Source§fn match_(
m_token: Option<&Token>,
span: Range<usize>,
) -> Result<<T as TokenParse>::Intermediate, ParseErr>
fn match_( m_token: Option<&Token>, span: Range<usize>, ) -> Result<<T as TokenParse>::Intermediate, ParseErr>
Tries to match the next token to the given component, if possible. Read more
Source§fn convert(
imed: <T as TokenParse>::Intermediate,
_span: Range<usize>,
) -> Result<T, ParseErr>
fn convert( imed: <T as TokenParse>::Intermediate, _span: Range<usize>, ) -> Result<T, ParseErr>
Parses the intermediate into the given component, raising an error if conversion fails.