[][src]Trait swc_ecma_utils::ExprFactory

pub trait ExprFactory: Into<Expr> {
    pub fn as_arg(self) -> ExprOrSpread { ... }
pub fn into_stmt(self) -> Stmt { ... }
pub fn as_callee(self) -> ExprOrSuper { ... }
pub fn as_obj(self) -> ExprOrSuper { ... }
pub fn apply(
        self,
        span: Span,
        this: Box<Expr>,
        args: Vec<ExprOrSpread>
    ) -> Expr { ... }
pub fn wrap_with_paren(self) -> Expr { ... }
pub fn make_eq<T>(self, right: T) -> Expr
    where
        T: Into<Expr>
, { ... }
pub fn make_bin<T>(self, op: BinaryOp, right: T) -> Expr
    where
        T: Into<Expr>
, { ... }
pub fn make_member<T>(self, prop: T) -> Expr
    where
        T: Into<Expr>
, { ... }
pub fn computed_member<T>(self, prop: T) -> Expr
    where
        T: Into<Expr>
, { ... } }

Extension methods for Expr.

Provided methods

pub fn as_arg(self) -> ExprOrSpread[src]

pub fn into_stmt(self) -> Stmt[src]

Creates an expression statement with self.

pub fn as_callee(self) -> ExprOrSuper[src]

pub fn as_obj(self) -> ExprOrSuper[src]

pub fn apply(self, span: Span, this: Box<Expr>, args: Vec<ExprOrSpread>) -> Expr[src]

pub fn wrap_with_paren(self) -> Expr[src]

pub fn make_eq<T>(self, right: T) -> Expr where
    T: Into<Expr>, 
[src]

Creates a binrary expr $self ===

pub fn make_bin<T>(self, op: BinaryOp, right: T) -> Expr where
    T: Into<Expr>, 
[src]

Creates a binrary expr $self $op $rhs

pub fn make_member<T>(self, prop: T) -> Expr where
    T: Into<Expr>, 
[src]

pub fn computed_member<T>(self, prop: T) -> Expr where
    T: Into<Expr>, 
[src]

Loading content...

Implementors

impl<T: Into<Expr>> ExprFactory for T[src]

Loading content...