[][src]Trait swc_ecma_transforms::util::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, Global>,
        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

pub fn into_stmt(self) -> Stmt

Creates an expression statement with self.

pub fn as_callee(self) -> ExprOrSuper

pub fn as_obj(self) -> ExprOrSuper

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

pub fn wrap_with_paren(self) -> Expr

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

Creates a binrary expr $self ===

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

Creates a binrary expr $self $op $rhs

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>, 

Loading content...

Implementors

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

Loading content...