pub enum Expr {
Show 19 variants
Literal(JsValue),
Identifier(String),
Assign {
target: Box<Expr>,
value: Box<Expr>,
},
Update {
op: UpdateOp,
target: Box<Expr>,
prefix: bool,
},
Binary {
op: BinaryOp,
left: Box<Expr>,
right: Box<Expr>,
},
Unary {
op: UnaryOp,
expr: Box<Expr>,
},
Member {
object: Box<Expr>,
property: String,
computed: Option<Box<Expr>>,
},
OptionalMember {
object: Box<Expr>,
property: String,
computed: Option<Box<Expr>>,
},
Call {
callee: Box<Expr>,
args: Vec<Expr>,
},
OptionalCall {
callee: Box<Expr>,
args: Vec<Expr>,
},
New {
callee: Box<Expr>,
args: Vec<Expr>,
},
Spread(Box<Expr>),
Array(Vec<Expr>),
Object(Vec<(String, Expr)>),
TemplateLiteral(Vec<TemplatePart>),
ArrowFunction {
params: Vec<String>,
body: ArrowBody,
is_async: bool,
},
Await(Box<Expr>),
RegExpLiteral {
pattern: String,
flags: String,
},
Yield(Option<Box<Expr>>),
}Variants§
Literal(JsValue)
Identifier(String)
Assign
Update
Binary
Unary
Member
OptionalMember
Call
OptionalCall
New
Spread(Box<Expr>)
Array(Vec<Expr>)
Object(Vec<(String, Expr)>)
TemplateLiteral(Vec<TemplatePart>)
ArrowFunction
Await(Box<Expr>)
RegExpLiteral
Yield(Option<Box<Expr>>)
Trait Implementations§
impl StructuralPartialEq for Expr
Auto Trait Implementations§
impl !RefUnwindSafe for Expr
impl !Send for Expr
impl !Sync for Expr
impl !UnwindSafe for Expr
impl Forget for Expr
impl Freeze for Expr
impl Move for Expr
impl Unpin for Expr
impl UnsafeUnpin 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