pub enum Expr {
Show 15 variants
Literal {
token: Token,
},
Identifier {
token: Token,
},
Array {
elements: Vec<Expr>,
},
ArrowFunction {
params: Vec<Expr>,
body: Box<Expr>,
},
Binary {
left: Box<Expr>,
operator: Token,
right: Box<Expr>,
},
Call {
callee: Box<Expr>,
arguments: Vec<Expr>,
},
Comma {
expressions: Vec<Expr>,
},
Conditional {
test: Box<Expr>,
consequent: Box<Expr>,
alternate: Box<Expr>,
},
Object {
properties: Vec<PropertyExpr>,
},
Spread {
expr: Box<Expr>,
},
Member {
computed: bool,
object: Box<Expr>,
property: Box<Expr>,
optional: bool,
},
New {
callee: Box<Expr>,
arguments: Vec<Expr>,
},
TemplateLiteral {
quasis: Vec<TemplateString>,
expressions: Vec<Expr>,
},
TaggedTemplate {
tag: Box<Expr>,
quasi: Box<Expr>,
},
Unary {
operator: Token,
argument: Box<Expr>,
prefix: bool,
},
}
Variants§
Literal
Identifier
Array
ArrowFunction
Binary
Call
Comma
Conditional
Object
Fields
§
properties: Vec<PropertyExpr>
Spread
Member
New
TemplateLiteral
TaggedTemplate
Unary
Trait Implementations§
impl StructuralPartialEq for Expr
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