Struct erg_parser::ast::Subscript
source · pub struct Subscript {
pub obj: Box<Expr>,
pub index: Box<Expr>,
pub r_sqbr: Token,
}
Fields§
§obj: Box<Expr>
§index: Box<Expr>
§r_sqbr: Token
Implementations§
Trait Implementations§
source§impl Locational for Subscript
impl Locational for Subscript
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.