pub enum NodeArgumentPattern {
WildcardArgument,
BinderArgument(WithMetaData<String>),
ConstructorArgument(WithMetaData<NodeMetaIdentifier>),
PatternArgument(Box<WithMetaData<NodePattern>>),
}
Expand description
NodeArgumentPattern represents an argument pattern node in the AST It can either be a WildcardArgument, BinderArgument, ConstructorArgument or PatternArgument
Variants§
WildcardArgument
Represents a wildcard argument
Example: match x with | Cons _ _ => "wildcard argument" end
BinderArgument(WithMetaData<String>)
Represents a binder argument
Example: match x with | Cons a _ => "binder argument" end
ConstructorArgument(WithMetaData<NodeMetaIdentifier>)
Represents a constructor argument
Example: match x with | Cons (Cons a b) _ => "constructor argument" end
PatternArgument(Box<WithMetaData<NodePattern>>)
Represents a pattern argument
Example: match x with | Cons (Cons a _) _ => "pattern argument" end
Trait Implementations§
Source§impl AstVisitor for NodeArgumentPattern
impl AstVisitor for NodeArgumentPattern
fn visit( &self, emitter: &mut dyn AstConverting, ) -> Result<TraversalResult, String>
Source§impl Clone for NodeArgumentPattern
impl Clone for NodeArgumentPattern
Source§fn clone(&self) -> NodeArgumentPattern
fn clone(&self) -> NodeArgumentPattern
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 NodeArgumentPattern
impl Debug for NodeArgumentPattern
Source§impl PartialEq for NodeArgumentPattern
impl PartialEq for NodeArgumentPattern
Source§impl PartialOrd for NodeArgumentPattern
impl PartialOrd for NodeArgumentPattern
impl Eq for NodeArgumentPattern
impl StructuralPartialEq for NodeArgumentPattern
Auto Trait Implementations§
impl Freeze for NodeArgumentPattern
impl RefUnwindSafe for NodeArgumentPattern
impl Send for NodeArgumentPattern
impl Sync for NodeArgumentPattern
impl Unpin for NodeArgumentPattern
impl UnwindSafe for NodeArgumentPattern
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