[−][src]Enum resast::expr::Expr
A slightly more granular program part that a statement
Variants
Array(ArrayExpr<'a>)
[0,,]
ArrowFunc(ArrowFuncExpr<'a>)
An arrow function
() => console.log();
x => {
return x;
}
Used for resolving possible sequence expressions that are arrow parameters
Assign(AssignExpr<'a>)
Assignment or update assignment
a = 0
b += 1
The await
keyword followed by another Expr
Binary(BinaryExpr<'a>)
An operation that has two arguments
Class(Class<'a>)
A class expression see Class
Call(CallExpr<'a>)
Calling a function or method
Conditional(ConditionalExpr<'a>)
A ternery expression
Func(Func<'a>)
see Function
Ident(Ident<'a>)
An identifier
Lit(Lit<'a>)
A literal value, see Literal
Logical(LogicalExpr<'a>)
A specialized BinaryExpr
for logical evaluation
true && true
false || true
Member(MemberExpr<'a>)
Accessing the member of a value
b['thing'];
c.stuff;
MetaProp(MetaProp<'a>)
currently just new.target
New(NewExpr<'a>)
var a = true ? 'stuff' : 'things';
{}
Calling a constructor
Obj(ObjExpr<'a>)
Sequence(SequenceExpr<'a>)
Any sequence of expressions separated with a comma
...
followed by an Expr
super
TaggedTemplate(TaggedTemplateExpr<'a>)
A template literal preceded by a tag function identifier
this
Unary(UnaryExpr<'a>)
An operation that has one argument
typeof 'a';
+9;
Update(UpdateExpr<'a>)
Increment or decrement
1++
--2
Yield(YieldExpr<'a>)
yield a value from inside of a generator function
Methods
impl<'a> Expr<'a>
[src]
pub fn ident_from(s: &'a str) -> Self
[src]
Trait Implementations
impl<'a> Clone for Expr<'a>
[src]
impl<'a> Debug for Expr<'a>
[src]
impl<'a> PartialEq<Expr<'a>> for Expr<'a>
[src]
impl<'a> StructuralPartialEq for Expr<'a>
[src]
Auto Trait Implementations
impl<'a> RefUnwindSafe for Expr<'a>
impl<'a> Send for Expr<'a>
impl<'a> Sync for Expr<'a>
impl<'a> Unpin for Expr<'a>
impl<'a> UnwindSafe for Expr<'a>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
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> 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>,