pub enum InstructionToken<'a> {
Instruction(AnInstruction<String>, &'a str),
Label(String, &'a str),
Breakpoint(&'a str),
TypeHint(TypeHint, &'a str),
AssertionContext(AssertionContext, &'a str),
}
Expand description
An intermediate object for the parsing / compilation pipeline. You probably want
LabelledInstruction
.
Variants§
Instruction(AnInstruction<String>, &'a str)
Label(String, &'a str)
Breakpoint(&'a str)
TypeHint(TypeHint, &'a str)
AssertionContext(AssertionContext, &'a str)
Implementations§
Source§impl<'a> InstructionToken<'a>
impl<'a> InstructionToken<'a>
pub fn token_str(&self) -> &'a str
pub fn to_labelled_instruction(&self) -> LabelledInstruction
Trait Implementations§
Source§impl<'a> Clone for InstructionToken<'a>
impl<'a> Clone for InstructionToken<'a>
Source§fn clone(&self) -> InstructionToken<'a>
fn clone(&self) -> InstructionToken<'a>
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 moreSource§impl<'a> Debug for InstructionToken<'a>
impl<'a> Debug for InstructionToken<'a>
Source§impl<'a> Hash for InstructionToken<'a>
impl<'a> Hash for InstructionToken<'a>
Source§impl<'a> PartialEq for InstructionToken<'a>
impl<'a> PartialEq for InstructionToken<'a>
impl<'a> Eq for InstructionToken<'a>
impl<'a> StructuralPartialEq for InstructionToken<'a>
Auto Trait Implementations§
impl<'a> Freeze for InstructionToken<'a>
impl<'a> RefUnwindSafe for InstructionToken<'a>
impl<'a> Send for InstructionToken<'a>
impl<'a> Sync for InstructionToken<'a>
impl<'a> Unpin for InstructionToken<'a>
impl<'a> UnwindSafe for InstructionToken<'a>
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§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more