pub enum ExpressionKind {
Show 31 variants
Identifier(String),
NumericLiteral(f64),
StringLiteral(String),
BigIntLiteral(String),
BooleanLiteral(bool),
NullLiteral,
RegexLiteral(String),
TemplateString(String),
UnaryExpression {
operator: String,
argument: Box<Expression>,
},
UpdateExpression {
operator: String,
argument: Box<Expression>,
prefix: bool,
},
BinaryExpression {
left: Box<Expression>,
operator: String,
right: Box<Expression>,
},
ConditionalExpression {
test: Box<Expression>,
consequent: Box<Expression>,
alternate: Box<Expression>,
},
MemberExpression {
object: Box<Expression>,
property: Box<Expression>,
computed: bool,
optional: bool,
},
CallExpression {
func: Box<Expression>,
args: Vec<Expression>,
},
NewExpression {
func: Box<Expression>,
args: Vec<Expression>,
},
AssignmentExpression {
left: Box<Expression>,
operator: String,
right: Box<Expression>,
},
AsExpression {
expression: Box<Expression>,
type_annotation: TypeAnnotation,
},
ArrowFunction {
type_params: Vec<TypeParameter>,
params: Vec<FunctionParam>,
return_type: Option<TypeAnnotation>,
body: Box<Statement>,
async_: bool,
},
ObjectLiteral {
properties: Vec<ObjectProperty>,
},
ArrayLiteral {
elements: Vec<Expression>,
},
SpreadElement(Box<Expression>),
AwaitExpression(Box<Expression>),
YieldExpression(Option<Box<Expression>>),
ImportExpression {
module_specifier: Box<Expression>,
},
FunctionExpression {
name: Option<String>,
type_params: Vec<TypeParameter>,
params: Vec<FunctionParam>,
return_type: Option<TypeAnnotation>,
body: Vec<Statement>,
async_: bool,
generator: bool,
},
TaggedTemplateExpression {
tag: Box<Expression>,
template: Box<Expression>,
},
TypeAssertionExpression {
expression: Box<Expression>,
type_annotation: TypeAnnotation,
},
NonNullExpression(Box<Expression>),
JsxElement(Box<JsxElement>),
JsxFragment(Box<JsxFragment>),
JsxSelfClosingElement(Box<JsxSelfClosingElement>),
}Variants§
Identifier(String)
NumericLiteral(f64)
StringLiteral(String)
BigIntLiteral(String)
BooleanLiteral(bool)
NullLiteral
RegexLiteral(String)
TemplateString(String)
UnaryExpression
UpdateExpression
BinaryExpression
ConditionalExpression
MemberExpression
CallExpression
NewExpression
AssignmentExpression
AsExpression
ArrowFunction
Fields
§
type_params: Vec<TypeParameter>§
params: Vec<FunctionParam>§
return_type: Option<TypeAnnotation>ObjectLiteral
Fields
§
properties: Vec<ObjectProperty>ArrayLiteral
Fields
§
elements: Vec<Expression>SpreadElement(Box<Expression>)
AwaitExpression(Box<Expression>)
YieldExpression(Option<Box<Expression>>)
ImportExpression
Fields
§
module_specifier: Box<Expression>FunctionExpression
Fields
§
type_params: Vec<TypeParameter>§
params: Vec<FunctionParam>§
return_type: Option<TypeAnnotation>TaggedTemplateExpression
TypeAssertionExpression
NonNullExpression(Box<Expression>)
JsxElement(Box<JsxElement>)
JsxFragment(Box<JsxFragment>)
JsxSelfClosingElement(Box<JsxSelfClosingElement>)
Trait Implementations§
Source§impl Clone for ExpressionKind
impl Clone for ExpressionKind
Source§fn clone(&self) -> ExpressionKind
fn clone(&self) -> ExpressionKind
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ExpressionKind
impl Debug for ExpressionKind
Source§impl<'de> Deserialize<'de> for ExpressionKind
impl<'de> Deserialize<'de> for ExpressionKind
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for ExpressionKind
impl RefUnwindSafe for ExpressionKind
impl Send for ExpressionKind
impl Sync for ExpressionKind
impl Unpin for ExpressionKind
impl UnwindSafe for ExpressionKind
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more