Struct erg_parser::ast::TupleAttribute
source · pub struct TupleAttribute {
pub obj: Box<Expr>,
pub index: Literal,
}
Expand description
e.g. obj.0, obj.1
Fields§
§obj: Box<Expr>
§index: Literal
Implementations§
Trait Implementations§
source§impl Clone for TupleAttribute
impl Clone for TupleAttribute
source§fn clone(&self) -> TupleAttribute
fn clone(&self) -> TupleAttribute
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 TupleAttribute
impl Debug for TupleAttribute
source§impl Display for TupleAttribute
impl Display for TupleAttribute
source§impl Hash for TupleAttribute
impl Hash for TupleAttribute
source§impl Locational for TupleAttribute
impl Locational for TupleAttribute
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 TupleAttribute
impl NestedDisplay for TupleAttribute
source§impl PartialEq<TupleAttribute> for TupleAttribute
impl PartialEq<TupleAttribute> for TupleAttribute
source§fn eq(&self, other: &TupleAttribute) -> bool
fn eq(&self, other: &TupleAttribute) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.