Enum erg_parser::ast::ParamPattern
source · pub enum ParamPattern {
Discard(Token),
VarName(VarName),
Lit(Literal),
Array(ParamArrayPattern),
Tuple(ParamTuplePattern),
Record(ParamRecordPattern),
Ref(VarName),
RefMut(VarName),
}
Expand description
関数定義や無名関数で使えるパターン
Variants§
Discard(Token)
VarName(VarName)
Lit(Literal)
Array(ParamArrayPattern)
Tuple(ParamTuplePattern)
Record(ParamRecordPattern)
Ref(VarName)
RefMut(VarName)
Implementations§
Trait Implementations§
source§impl Clone for ParamPattern
impl Clone for ParamPattern
source§fn clone(&self) -> ParamPattern
fn clone(&self) -> ParamPattern
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 ParamPattern
impl Debug for ParamPattern
source§impl Display for ParamPattern
impl Display for ParamPattern
source§impl Hash for ParamPattern
impl Hash for ParamPattern
source§impl Locational for ParamPattern
impl Locational for ParamPattern
source§fn loc(&self) -> Location
fn loc(&self) -> Location
NOTE:
loc
cannot be treated as a light method when self
is a large grammatical element.
If possible, delay the computation by passing &impl Locational
or other means.fn ln_begin(&self) -> Option<u32>
fn ln_end(&self) -> Option<u32>
fn col_begin(&self) -> Option<u32>
fn col_end(&self) -> Option<u32>
source§impl NestedDisplay for ParamPattern
impl NestedDisplay for ParamPattern
source§impl PartialEq<ParamPattern> for ParamPattern
impl PartialEq<ParamPattern> for ParamPattern
source§fn eq(&self, other: &ParamPattern) -> bool
fn eq(&self, other: &ParamPattern) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Eq for ParamPattern
impl StructuralEq for ParamPattern
impl StructuralPartialEq for ParamPattern
Auto Trait Implementations§
impl RefUnwindSafe for ParamPattern
impl Send for ParamPattern
impl Sync for ParamPattern
impl Unpin for ParamPattern
impl UnwindSafe for ParamPattern
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