Struct muse_lang::compiler::syntax::SingleMatch
source · pub struct SingleMatch {
pub publish: Option<Ranged<Token>>,
pub kind: Ranged<Symbol>,
pub pattern: Ranged<Pattern>,
pub eq: Option<Ranged<Token>>,
pub value: Ranged<Expression>,
pub else: Option<Else>,
}Expand description
The syntax components of a single match expression.
Fields§
§publish: Option<Ranged<Token>>The pub keyword.
kind: Ranged<Symbol>The kind of variables to declare (let/var) from the pattern.
pattern: Ranged<Pattern>The pattern match to evaluate.
eq: Option<Ranged<Token>>The = token.
value: Ranged<Expression>The value to pattern match against.
else: Option<Else>The else expression to evaluate if the pattern match fails.
Trait Implementations§
source§impl Clone for SingleMatch
impl Clone for SingleMatch
source§fn clone(&self) -> SingleMatch
fn clone(&self) -> SingleMatch
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 Debug for SingleMatch
impl Debug for SingleMatch
source§impl PartialEq for SingleMatch
impl PartialEq for SingleMatch
source§impl TokenizeInto for SingleMatch
impl TokenizeInto for SingleMatch
impl StructuralPartialEq for SingleMatch
Auto Trait Implementations§
impl Freeze for SingleMatch
impl RefUnwindSafe for SingleMatch
impl Send for SingleMatch
impl Sync for SingleMatch
impl Unpin for SingleMatch
impl UnwindSafe for SingleMatch
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
§impl<A> Cast for A
impl<A> Cast for A
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)§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> TokenizeRanged for Twhere
T: TokenizeInto,
impl<T> TokenizeRanged for Twhere
T: TokenizeInto,
source§fn tokenize_ranged(
&self,
_range: SourceRange,
tokens: &mut VecDeque<Ranged<Token>>,
)
fn tokenize_ranged( &self, _range: SourceRange, tokens: &mut VecDeque<Ranged<Token>>, )
Tokenize
self into tokens within the enclosing range.