Struct erg_parser::ast::ConstTypeAsc
source · pub struct ConstTypeAsc {
pub expr: Box<ConstExpr>,
pub t_spec: Box<TypeSpecWithOp>,
}
Fields§
§expr: Box<ConstExpr>
§t_spec: Box<TypeSpecWithOp>
Implementations§
source§impl ConstTypeAsc
impl ConstTypeAsc
pub fn new(expr: ConstExpr, t_spec: TypeSpecWithOp) -> Self
pub fn is_instance_ascription(&self) -> bool
pub fn is_subtype_ascription(&self) -> bool
Trait Implementations§
source§impl Clone for ConstTypeAsc
impl Clone for ConstTypeAsc
source§fn clone(&self) -> ConstTypeAsc
fn clone(&self) -> ConstTypeAsc
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 ConstTypeAsc
impl Debug for ConstTypeAsc
source§impl Display for ConstTypeAsc
impl Display for ConstTypeAsc
source§impl Hash for ConstTypeAsc
impl Hash for ConstTypeAsc
source§impl Locational for ConstTypeAsc
impl Locational for ConstTypeAsc
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 ConstTypeAsc
impl NestedDisplay for ConstTypeAsc
source§impl PartialEq<ConstTypeAsc> for ConstTypeAsc
impl PartialEq<ConstTypeAsc> for ConstTypeAsc
source§fn eq(&self, other: &ConstTypeAsc) -> bool
fn eq(&self, other: &ConstTypeAsc) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.