pub enum Expr {
Show 13 variants
Anonymous(RefType, HashMap<RefField, Expr>),
Array(Box<Expr>, Box<Expr>),
Call(Box<Call>),
Constant(Constant),
Constructor(ConstructorCall),
Closure(RefFun, Vec<Statement>),
EnumConstr(RefType, RefEnumConstruct, Vec<Expr>),
Field(Box<Expr>, Str),
FunRef(RefFun),
IfElse {
cond: Box<Expr>,
if_: Vec<Statement>,
else_: Vec<Statement>,
},
Op(Operation),
Unknown(String),
Variable(Reg, Option<Str>),
}
Expand description
An expression with a value
Variants§
Anonymous(RefType, HashMap<RefField, Expr>)
An anonymous structure : { field: value }
Array(Box<Expr>, Box<Expr>)
Array access : array[index]
Call(Box<Call>)
Function call
Constant(Constant)
Constant value
Constructor(ConstructorCall)
Constructor call
Closure(RefFun, Vec<Statement>)
Arrow function (…) -> {…}
EnumConstr(RefType, RefEnumConstruct, Vec<Expr>)
Field(Box<Expr>, Str)
Field access : obj.field
FunRef(RefFun)
Function reference
IfElse
If/Else expression, both branches expressions types must unify (https://haxe.org/manual/expression-if.html)
Op(Operation)
Operator
Unknown(String)
Variable(Reg, Option<Str>)
Variable identifier
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Expr
impl RefUnwindSafe for Expr
impl Send for Expr
impl Sync for Expr
impl Unpin for Expr
impl UnwindSafe for Expr
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