[−][src]Enum boa::syntax::ast::expr::ExprDef
A Javascript Expression
Variants
BinOpExpr(BinOp, Box<Expr>, Box<Expr>)
Run a operation between 2 expressions
UnaryOpExpr(UnaryOp, Box<Expr>)
Run an operation on a value
ConstExpr(Const)
Make a constant value
ConstDeclExpr(Vec<(String, Option<Expr>)>)
Const declaration
ConstructExpr(Box<Expr>, Vec<Expr>)
Construct an object from the function and arg{
BlockExpr(Vec<Expr>)
Run several expressions from top-to-bottom
LocalExpr(String)
Load a reference to a value
GetConstFieldExpr(Box<Expr>, String)
Gets the constant field of a value
GetFieldExpr(Box<Expr>, Box<Expr>)
Gets the field of a value
CallExpr(Box<Expr>, Vec<Expr>)
Call a function with some values
WhileLoopExpr(Box<Expr>, Box<Expr>)
Repeatedly run an expression while the conditional expression resolves to true
IfExpr(Box<Expr>, Box<Expr>, Option<Box<Expr>>)
Check if a conditional expression is true and run an expression if it is and another expression if it isn't
SwitchExpr(Box<Expr>, Vec<(Expr, Vec<Expr>)>, Option<Box<Expr>>)
Run blocks whose cases match the expression
ObjectDeclExpr(Box<BTreeMap<String, Expr>>)
Create an object out of the binary tree given
ArrayDeclExpr(Vec<Expr>)
Create an array with items inside
FunctionDeclExpr(Option<String>, Vec<String>, Box<Expr>)
Create a function with the given name, arguments, and expression
ArrowFunctionDeclExpr(Vec<String>, Box<Expr>)
Create an arrow function with the given arguments and expression
ReturnExpr(Option<Box<Expr>>)
Return the expression from a function
ThrowExpr(Box<Expr>)
Throw a value
AssignExpr(Box<Expr>, Box<Expr>)
Assign an expression to a value
VarDeclExpr(Vec<(String, Option<Expr>)>)
{ A variable declaratio }
LetDeclExpr(Vec<(String, Option<Expr>)>)
Let declaraton
TypeOfExpr(Box<Expr>)
Return a string representing the type of the given expression
Trait Implementations
impl Operator for ExprDef
[src]
fn get_assoc(&self) -> bool
[src]
fn get_precedence(&self) -> u64
[src]
fn get_precedence_and_assoc(&self) -> (u64, bool)
[src]
Get the precedence and associativity of this operator
impl PartialEq<ExprDef> for ExprDef
[src]
impl Drop for ExprDef
[src]
impl Clone for ExprDef
[src]
fn clone(&self) -> ExprDef
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl Debug for ExprDef
[src]
impl Display for ExprDef
[src]
impl Finalize for ExprDef
[src]
impl Trace for ExprDef
[src]
Auto Trait Implementations
Blanket Implementations
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T> From<T> for T
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,