Expand description
Expressions, these include this
, identifiers, arrays, objects,
binary expressions, unary expressions, and more.
See the ECMAScript spec.
Constants§
Functions§
- args
- Arguments to a function.
- array_
expr - An array literal such as
[foo, bar, ...baz]
. - assign_
expr - An assignment expression such as
foo += bar
orfoo = 5
. - binary_
expr - A binary expression such as
2 + 2
orfoo * bar + 2
- bracket_
expr - An array expression for property access or indexing, such as
foo[0]
orfoo?.["bar"]
- conditional_
expr - A conditional expression such as
foo ? bar : baz
- dot_
expr - A dot expression for accessing a property
- expr
- A general expression.
- expr_
or_ spread - identifier_
name - An identifier name, either an ident or a keyword
- identifier_
reference - lhs_
expr - A left hand side expression, either a member expression or a call expression such as
foo()
. - literal
- A literal expression.
- member_
or_ new_ expr - A member or new expression with subscripts. e.g.
new foo
,new Foo()
,foo
, orfoo().bar[5]
- object_
expr - An object literal such as
{ a: b, "b": 5 + 5 }
. - object_
prop_ name - object_
property - An individual object property such as
"a": b
or5: 6 + 6
. - paren_
expr - A parenthesis expression, also called a grouping expression.
- paren_
or_ arrow_ expr - postfix_
expr - A postifx expression, either
LHSExpr [no linebreak] ++
orLHSExpr [no linebreak] --
. - primary_
expr - A primary expression such as a literal, an object, an array, or
this
. - spread_
element - A spread element consisting of three dots and an assignment expression such as
...foo
- subscripts
- Dot, Array, or Call expr subscripts. Including optional chaining.
- template
- A template literal such as “
abcd ${efg}
” - unary_
expr - A unary expression such as
!foo
or++bar
- yield_
expr