pub enum Expression {
Show 33 variants
This(This),
Identifier(Identifier),
Literal(Literal),
RegExpLiteral(RegExpLiteral),
ArrayLiteral(ArrayLiteral),
ObjectLiteral(ObjectLiteral),
Spread(Spread),
FunctionExpression(FunctionExpression),
ArrowFunction(ArrowFunction),
AsyncArrowFunction(AsyncArrowFunction),
GeneratorExpression(GeneratorExpression),
AsyncFunctionExpression(AsyncFunctionExpression),
AsyncGeneratorExpression(AsyncGeneratorExpression),
ClassExpression(Box<ClassExpression>),
TemplateLiteral(TemplateLiteral),
PropertyAccess(PropertyAccess),
New(New),
Call(Call),
SuperCall(SuperCall),
ImportCall(ImportCall),
Optional(Optional),
TaggedTemplate(TaggedTemplate),
NewTarget(NewTarget),
ImportMeta(ImportMeta),
Assign(Assign),
Unary(Unary),
Update(Update),
Binary(Binary),
BinaryInPrivate(BinaryInPrivate),
Conditional(Conditional),
Await(Await),
Yield(Yield),
Parenthesized(Parenthesized),
}Expand description
The Expression Parse Node.
See the module level documentation for more information.
Variants§
This(This)
The ECMAScript this keyword refers to the object it belongs to.
A property of an execution context (global, function or eval) that, in non–strict mode, is always a reference to an object and in strict mode can be any value.
More information:
Identifier(Identifier)
See Identifier.
Literal(Literal)
See Literal.
RegExpLiteral(RegExpLiteral)
See RegExpLiteral.
ArrayLiteral(ArrayLiteral)
See ArrayLiteral.
ObjectLiteral(ObjectLiteral)
See ObjectLiteral.
Spread(Spread)
See Spread,
FunctionExpression(FunctionExpression)
See FunctionExpression.
ArrowFunction(ArrowFunction)
See ArrowFunction.
AsyncArrowFunction(AsyncArrowFunction)
See AsyncArrowFunction.
GeneratorExpression(GeneratorExpression)
See GeneratorExpression.
AsyncFunctionExpression(AsyncFunctionExpression)
AsyncGeneratorExpression(AsyncGeneratorExpression)
ClassExpression(Box<ClassExpression>)
See ClassExpression.
TemplateLiteral(TemplateLiteral)
See TemplateLiteral.
PropertyAccess(PropertyAccess)
See PropertyAccess.
New(New)
See New.
Call(Call)
See Call.
SuperCall(SuperCall)
See SuperCall.
ImportCall(ImportCall)
See ImportCall.
Optional(Optional)
See Optional.
TaggedTemplate(TaggedTemplate)
See TaggedTemplate.
NewTarget(NewTarget)
The new.target pseudo-property expression.
ImportMeta(ImportMeta)
The import.meta pseudo-property expression.
Assign(Assign)
See Assign.
Unary(Unary)
See Unary.
Update(Update)
See Unary.
Binary(Binary)
See Binary.
BinaryInPrivate(BinaryInPrivate)
See BinaryInPrivate.
Conditional(Conditional)
See Conditional.
Await(Await)
See Await.
Yield(Yield)
See Yield.
Parenthesized(Parenthesized)
See Parenthesized.
Implementations§
Source§impl Expression
impl Expression
Sourcepub const fn is_anonymous_function_definition(&self) -> bool
pub const fn is_anonymous_function_definition(&self) -> bool
Returns if the expression is a function definition without a name.
More information:
Sourcepub fn set_anonymous_function_definition_name(&mut self, name: &Identifier)
pub fn set_anonymous_function_definition_name(&mut self, name: &Identifier)
Sets the name of an anonymous function definition.
This is used to set the name of a function expression when it is assigned to a variable. If the function already has a name, this does nothing.
Trait Implementations§
Source§impl<'arbitrary> Arbitrary<'arbitrary> for Expression
impl<'arbitrary> Arbitrary<'arbitrary> for Expression
Source§fn arbitrary(u: &mut Unstructured<'arbitrary>) -> Result<Self>
fn arbitrary(u: &mut Unstructured<'arbitrary>) -> Result<Self>
Self from the given unstructured data. Read moreSource§fn arbitrary_take_rest(u: Unstructured<'arbitrary>) -> Result<Self>
fn arbitrary_take_rest(u: Unstructured<'arbitrary>) -> Result<Self>
Self from the entirety of the given
unstructured data. Read moreSource§fn size_hint(depth: usize) -> (usize, Option<usize>)
fn size_hint(depth: usize) -> (usize, Option<usize>)
Unstructured this type
needs to construct itself. Read moreSource§fn try_size_hint(
depth: usize,
) -> Result<(usize, Option<usize>), MaxRecursionReached>
fn try_size_hint( depth: usize, ) -> Result<(usize, Option<usize>), MaxRecursionReached>
Unstructured this type
needs to construct itself. Read moreSource§impl Clone for Expression
impl Clone for Expression
Source§fn clone(&self) -> Expression
fn clone(&self) -> Expression
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more