Enum erg_parser::ast::ConstExpr
source · pub enum ConstExpr {
Show 14 variants
Lit(Literal),
Erased(Literal),
Accessor(ConstAccessor),
App(ConstApp),
Array(ConstArray),
Set(ConstSet),
Dict(ConstDict),
Tuple(ConstTuple),
Record(ConstRecord),
Def(ConstDef),
Lambda(ConstLambda),
BinOp(ConstBinOp),
UnaryOp(ConstUnaryOp),
TypeAsc(ConstTypeAsc),
}
Expand description
valid expression for an argument of polymorphic types 多相型の実引数として有効な式
Variants§
Lit(Literal)
Erased(Literal)
Accessor(ConstAccessor)
App(ConstApp)
Array(ConstArray)
Set(ConstSet)
Dict(ConstDict)
Tuple(ConstTuple)
Record(ConstRecord)
Def(ConstDef)
Lambda(ConstLambda)
BinOp(ConstBinOp)
UnaryOp(ConstUnaryOp)
TypeAsc(ConstTypeAsc)
Implementations§
Trait Implementations§
source§impl FromIterator<ConstExpr> for ConstBlock
impl FromIterator<ConstExpr> for ConstBlock
source§impl Locational for ConstExpr
impl Locational for ConstExpr
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.