pub enum AnyJsExpression {
Show 37 variants AnyJsLiteralExpression(AnyJsLiteralExpression), JsArrayExpression(JsArrayExpression), JsArrowFunctionExpression(JsArrowFunctionExpression), JsAssignmentExpression(JsAssignmentExpression), JsAwaitExpression(JsAwaitExpression), JsBinaryExpression(JsBinaryExpression), JsBogusExpression(JsBogusExpression), JsCallExpression(JsCallExpression), JsClassExpression(JsClassExpression), JsComputedMemberExpression(JsComputedMemberExpression), JsConditionalExpression(JsConditionalExpression), JsFunctionExpression(JsFunctionExpression), JsIdentifierExpression(JsIdentifierExpression), JsImportCallExpression(JsImportCallExpression), JsImportMetaExpression(JsImportMetaExpression), JsInExpression(JsInExpression), JsInstanceofExpression(JsInstanceofExpression), JsLogicalExpression(JsLogicalExpression), JsNewExpression(JsNewExpression), JsNewTargetExpression(JsNewTargetExpression), JsObjectExpression(JsObjectExpression), JsParenthesizedExpression(JsParenthesizedExpression), JsPostUpdateExpression(JsPostUpdateExpression), JsPreUpdateExpression(JsPreUpdateExpression), JsSequenceExpression(JsSequenceExpression), JsStaticMemberExpression(JsStaticMemberExpression), JsSuperExpression(JsSuperExpression), JsTemplateExpression(JsTemplateExpression), JsThisExpression(JsThisExpression), JsUnaryExpression(JsUnaryExpression), JsYieldExpression(JsYieldExpression), JsxTagExpression(JsxTagExpression), TsAsExpression(TsAsExpression), TsInstantiationExpression(TsInstantiationExpression), TsNonNullAssertionExpression(TsNonNullAssertionExpression), TsSatisfiesExpression(TsSatisfiesExpression), TsTypeAssertionExpression(TsTypeAssertionExpression),
}

Variants§

§

AnyJsLiteralExpression(AnyJsLiteralExpression)

§

JsArrayExpression(JsArrayExpression)

§

JsArrowFunctionExpression(JsArrowFunctionExpression)

§

JsAssignmentExpression(JsAssignmentExpression)

§

JsAwaitExpression(JsAwaitExpression)

§

JsBinaryExpression(JsBinaryExpression)

§

JsBogusExpression(JsBogusExpression)

§

JsCallExpression(JsCallExpression)

§

JsClassExpression(JsClassExpression)

§

JsComputedMemberExpression(JsComputedMemberExpression)

§

JsConditionalExpression(JsConditionalExpression)

§

JsFunctionExpression(JsFunctionExpression)

§

JsIdentifierExpression(JsIdentifierExpression)

§

JsImportCallExpression(JsImportCallExpression)

§

JsImportMetaExpression(JsImportMetaExpression)

§

JsInExpression(JsInExpression)

§

JsInstanceofExpression(JsInstanceofExpression)

§

JsLogicalExpression(JsLogicalExpression)

§

JsNewExpression(JsNewExpression)

§

JsNewTargetExpression(JsNewTargetExpression)

§

JsObjectExpression(JsObjectExpression)

§

JsParenthesizedExpression(JsParenthesizedExpression)

§

JsPostUpdateExpression(JsPostUpdateExpression)

§

JsPreUpdateExpression(JsPreUpdateExpression)

§

JsSequenceExpression(JsSequenceExpression)

§

JsStaticMemberExpression(JsStaticMemberExpression)

§

JsSuperExpression(JsSuperExpression)

§

JsTemplateExpression(JsTemplateExpression)

§

JsThisExpression(JsThisExpression)

§

JsUnaryExpression(JsUnaryExpression)

§

JsYieldExpression(JsYieldExpression)

§

JsxTagExpression(JsxTagExpression)

§

TsAsExpression(TsAsExpression)

§

TsInstantiationExpression(TsInstantiationExpression)

§

TsNonNullAssertionExpression(TsNonNullAssertionExpression)

§

TsSatisfiesExpression(TsSatisfiesExpression)

§

TsTypeAssertionExpression(TsTypeAssertionExpression)

Implementations§

source§

impl AnyJsExpression

source

pub fn as_any_js_literal_expression(&self) -> Option<&AnyJsLiteralExpression>

source

pub fn as_js_array_expression(&self) -> Option<&JsArrayExpression>

source

pub fn as_js_arrow_function_expression( &self ) -> Option<&JsArrowFunctionExpression>

source

pub fn as_js_assignment_expression(&self) -> Option<&JsAssignmentExpression>

source

pub fn as_js_await_expression(&self) -> Option<&JsAwaitExpression>

source

pub fn as_js_binary_expression(&self) -> Option<&JsBinaryExpression>

source

pub fn as_js_bogus_expression(&self) -> Option<&JsBogusExpression>

source

pub fn as_js_call_expression(&self) -> Option<&JsCallExpression>

source

pub fn as_js_class_expression(&self) -> Option<&JsClassExpression>

source

pub fn as_js_computed_member_expression( &self ) -> Option<&JsComputedMemberExpression>

source

pub fn as_js_conditional_expression(&self) -> Option<&JsConditionalExpression>

source

pub fn as_js_function_expression(&self) -> Option<&JsFunctionExpression>

source

pub fn as_js_identifier_expression(&self) -> Option<&JsIdentifierExpression>

source

pub fn as_js_import_call_expression(&self) -> Option<&JsImportCallExpression>

source

pub fn as_js_import_meta_expression(&self) -> Option<&JsImportMetaExpression>

source

pub fn as_js_in_expression(&self) -> Option<&JsInExpression>

source

pub fn as_js_instanceof_expression(&self) -> Option<&JsInstanceofExpression>

source

pub fn as_js_logical_expression(&self) -> Option<&JsLogicalExpression>

source

pub fn as_js_new_expression(&self) -> Option<&JsNewExpression>

source

pub fn as_js_new_target_expression(&self) -> Option<&JsNewTargetExpression>

source

pub fn as_js_object_expression(&self) -> Option<&JsObjectExpression>

source

pub fn as_js_parenthesized_expression( &self ) -> Option<&JsParenthesizedExpression>

source

pub fn as_js_post_update_expression(&self) -> Option<&JsPostUpdateExpression>

source

pub fn as_js_pre_update_expression(&self) -> Option<&JsPreUpdateExpression>

source

pub fn as_js_sequence_expression(&self) -> Option<&JsSequenceExpression>

source

pub fn as_js_static_member_expression( &self ) -> Option<&JsStaticMemberExpression>

source

pub fn as_js_super_expression(&self) -> Option<&JsSuperExpression>

source

pub fn as_js_template_expression(&self) -> Option<&JsTemplateExpression>

source

pub fn as_js_this_expression(&self) -> Option<&JsThisExpression>

source

pub fn as_js_unary_expression(&self) -> Option<&JsUnaryExpression>

source

pub fn as_js_yield_expression(&self) -> Option<&JsYieldExpression>

source

pub fn as_jsx_tag_expression(&self) -> Option<&JsxTagExpression>

source

pub fn as_ts_as_expression(&self) -> Option<&TsAsExpression>

source

pub fn as_ts_instantiation_expression( &self ) -> Option<&TsInstantiationExpression>

source

pub fn as_ts_non_null_assertion_expression( &self ) -> Option<&TsNonNullAssertionExpression>

source

pub fn as_ts_satisfies_expression(&self) -> Option<&TsSatisfiesExpression>

source

pub fn as_ts_type_assertion_expression( &self ) -> Option<&TsTypeAssertionExpression>

source§

impl AnyJsExpression

source

pub fn omit_parentheses(self) -> AnyJsExpression

Try to extract non JsParenthesizedExpression from JsAnyExpression

source

pub fn precedence(&self) -> SyntaxResult<OperatorPrecedence>

source

pub fn as_js_reference_identifier(&self) -> Option<JsReferenceIdentifier>

Return identifier if the expression is an identifier expression.

source

pub fn as_static_value(&self) -> Option<StaticValue>

source

pub fn get_callee_object_name(&self) -> Option<JsSyntaxToken>

source

pub fn get_callee_member_name(&self) -> Option<JsSyntaxToken>

source

pub fn contains_a_test_pattern(&self) -> SyntaxResult<bool>

This function checks if a call expressions has one of the following members:

  • it
  • it.only
  • it.skip
  • describe
  • describe.only
  • describe.skip
  • test
  • test.only
  • test.skip
  • test.step
  • test.describe
  • test.describe.only
  • test.describe.parallel
  • test.describe.parallel.only
  • test.describe.serial
  • test.describe.serial.only
  • skip
  • xit
  • xdescribe
  • xtest
  • fit
  • fdescribe
  • ftest

Based on this article

Trait Implementations§

source§

impl AstNode for AnyJsExpression

§

type Language = JsLanguage

source§

const KIND_SET: SyntaxKindSet<Language> = _

source§

fn can_cast(kind: SyntaxKind) -> bool

Returns true if a node with the given kind can be cased to this AST node.
source§

fn cast(syntax: SyntaxNode) -> Option<Self>

Tries to cast the passed syntax node to this AST node. Read more
source§

fn syntax(&self) -> &SyntaxNode

Returns the underlying syntax node.
source§

fn into_syntax(self) -> SyntaxNode

Returns the underlying syntax node.
source§

fn cast_ref(syntax: &SyntaxNode<Self::Language>) -> Option<Self>
where Self: Sized,

Takes a reference of a syntax node and tries to cast it to this AST node. Read more
source§

fn try_cast( syntax: SyntaxNode<Self::Language> ) -> Result<Self, SyntaxNode<Self::Language>>

Tries to cast the passed syntax node to this AST node. Read more
source§

fn try_cast_node<T>(node: T) -> Result<Self, T>
where T: AstNode<Language = Self::Language>,

Tries to cast the AST node into this node. Read more
source§

fn unwrap_cast(syntax: SyntaxNode<Self::Language>) -> Self
where Self: Sized,

Cast this node to this AST node Read more
source§

fn text(&self) -> String

Returns the string representation of this node without the leading and trailing trivia
source§

fn range(&self) -> TextRange

source§

fn clone_subtree(&self) -> Self
where Self: Sized,

source§

fn parent<T>(&self) -> Option<T>
where T: AstNode<Language = Self::Language>,

source§

fn with_leading_trivia_pieces<I>(self, trivia: I) -> Option<Self>

Return a new version of this node with the leading trivia of its first token replaced with trivia.
source§

fn with_trailing_trivia_pieces<I>(self, trivia: I) -> Option<Self>

Return a new version of this node with the trailing trivia of its last token replaced with trivia.
source§

fn prepend_trivia_pieces<I>(self, trivia: I) -> Option<Self>

source§

fn append_trivia_pieces<I>(self, trivia: I) -> Option<Self>

source§

fn trim_trivia(self) -> Option<Self>

Return a new version of this node without leading and trailing newlines and whitespaces.
source§

fn trim_leading_trivia(self) -> Option<Self>

Return a new version of this node without leading newlines and whitespaces.
source§

fn trim_trailing_trivia(self) -> Option<Self>

Return a new version of this node without trailing newlines and whitespaces.
source§

impl Clone for AnyJsExpression

source§

fn clone(&self) -> AnyJsExpression

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for AnyJsExpression

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Display for AnyJsExpression

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl From<AnyJsExpression> for JsSyntaxElement

source§

fn from(n: AnyJsExpression) -> SyntaxElement

Converts to this type from the input type.
source§

impl From<AnyJsExpression> for JsSyntaxNode

source§

fn from(n: AnyJsExpression) -> SyntaxNode

Converts to this type from the input type.
source§

impl From<AnyJsMemberExpression> for AnyJsExpression

source§

fn from(expression: AnyJsMemberExpression) -> Self

Converts to this type from the input type.
source§

impl From<AnyJsOptionalChainExpression> for AnyJsExpression

source§

fn from(node: AnyJsOptionalChainExpression) -> AnyJsExpression

Converts to this type from the input type.
source§

impl From<JsArrayExpression> for AnyJsExpression

source§

fn from(node: JsArrayExpression) -> AnyJsExpression

Converts to this type from the input type.
source§

impl From<JsArrowFunctionExpression> for AnyJsExpression

source§

fn from(node: JsArrowFunctionExpression) -> AnyJsExpression

Converts to this type from the input type.
source§

impl From<JsAssignmentExpression> for AnyJsExpression

source§

fn from(node: JsAssignmentExpression) -> AnyJsExpression

Converts to this type from the input type.
source§

impl From<JsAwaitExpression> for AnyJsExpression

source§

fn from(node: JsAwaitExpression) -> AnyJsExpression

Converts to this type from the input type.
source§

impl From<JsBinaryExpression> for AnyJsExpression

source§

fn from(node: JsBinaryExpression) -> AnyJsExpression

Converts to this type from the input type.
source§

impl From<JsBogusExpression> for AnyJsExpression

source§

fn from(node: JsBogusExpression) -> AnyJsExpression

Converts to this type from the input type.
source§

impl From<JsCallExpression> for AnyJsExpression

source§

fn from(node: JsCallExpression) -> AnyJsExpression

Converts to this type from the input type.
source§

impl From<JsClassExpression> for AnyJsExpression

source§

fn from(node: JsClassExpression) -> AnyJsExpression

Converts to this type from the input type.
source§

impl From<JsComputedMemberExpression> for AnyJsExpression

source§

fn from(node: JsComputedMemberExpression) -> AnyJsExpression

Converts to this type from the input type.
source§

impl From<JsConditionalExpression> for AnyJsExpression

source§

fn from(node: JsConditionalExpression) -> AnyJsExpression

Converts to this type from the input type.
source§

impl From<JsFunctionExpression> for AnyJsExpression

source§

fn from(node: JsFunctionExpression) -> AnyJsExpression

Converts to this type from the input type.
source§

impl From<JsIdentifierExpression> for AnyJsExpression

source§

fn from(node: JsIdentifierExpression) -> AnyJsExpression

Converts to this type from the input type.
source§

impl From<JsImportCallExpression> for AnyJsExpression

source§

fn from(node: JsImportCallExpression) -> AnyJsExpression

Converts to this type from the input type.
source§

impl From<JsImportMetaExpression> for AnyJsExpression

source§

fn from(node: JsImportMetaExpression) -> AnyJsExpression

Converts to this type from the input type.
source§

impl From<JsInExpression> for AnyJsExpression

source§

fn from(node: JsInExpression) -> AnyJsExpression

Converts to this type from the input type.
source§

impl From<JsInstanceofExpression> for AnyJsExpression

source§

fn from(node: JsInstanceofExpression) -> AnyJsExpression

Converts to this type from the input type.
source§

impl From<JsLogicalExpression> for AnyJsExpression

source§

fn from(node: JsLogicalExpression) -> AnyJsExpression

Converts to this type from the input type.
source§

impl From<JsNewExpression> for AnyJsExpression

source§

fn from(node: JsNewExpression) -> AnyJsExpression

Converts to this type from the input type.
source§

impl From<JsNewTargetExpression> for AnyJsExpression

source§

fn from(node: JsNewTargetExpression) -> AnyJsExpression

Converts to this type from the input type.
source§

impl From<JsObjectExpression> for AnyJsExpression

source§

fn from(node: JsObjectExpression) -> AnyJsExpression

Converts to this type from the input type.
source§

impl From<JsParenthesizedExpression> for AnyJsExpression

source§

fn from(node: JsParenthesizedExpression) -> AnyJsExpression

Converts to this type from the input type.
source§

impl From<JsPostUpdateExpression> for AnyJsExpression

source§

fn from(node: JsPostUpdateExpression) -> AnyJsExpression

Converts to this type from the input type.
source§

impl From<JsPreUpdateExpression> for AnyJsExpression

source§

fn from(node: JsPreUpdateExpression) -> AnyJsExpression

Converts to this type from the input type.
source§

impl From<JsSequenceExpression> for AnyJsExpression

source§

fn from(node: JsSequenceExpression) -> AnyJsExpression

Converts to this type from the input type.
source§

impl From<JsStaticMemberExpression> for AnyJsExpression

source§

fn from(node: JsStaticMemberExpression) -> AnyJsExpression

Converts to this type from the input type.
source§

impl From<JsSuperExpression> for AnyJsExpression

source§

fn from(node: JsSuperExpression) -> AnyJsExpression

Converts to this type from the input type.
source§

impl From<JsTemplateExpression> for AnyJsExpression

source§

fn from(node: JsTemplateExpression) -> AnyJsExpression

Converts to this type from the input type.
source§

impl From<JsThisExpression> for AnyJsExpression

source§

fn from(node: JsThisExpression) -> AnyJsExpression

Converts to this type from the input type.
source§

impl From<JsUnaryExpression> for AnyJsExpression

source§

fn from(node: JsUnaryExpression) -> AnyJsExpression

Converts to this type from the input type.
source§

impl From<JsYieldExpression> for AnyJsExpression

source§

fn from(node: JsYieldExpression) -> AnyJsExpression

Converts to this type from the input type.
source§

impl From<JsxTagExpression> for AnyJsExpression

source§

fn from(node: JsxTagExpression) -> AnyJsExpression

Converts to this type from the input type.
source§

impl From<TsAsExpression> for AnyJsExpression

source§

fn from(node: TsAsExpression) -> AnyJsExpression

Converts to this type from the input type.
source§

impl From<TsInstantiationExpression> for AnyJsExpression

source§

fn from(node: TsInstantiationExpression) -> AnyJsExpression

Converts to this type from the input type.
source§

impl From<TsNonNullAssertionExpression> for AnyJsExpression

source§

fn from(node: TsNonNullAssertionExpression) -> AnyJsExpression

Converts to this type from the input type.
source§

impl From<TsSatisfiesExpression> for AnyJsExpression

source§

fn from(node: TsSatisfiesExpression) -> AnyJsExpression

Converts to this type from the input type.
source§

impl From<TsTypeAssertionExpression> for AnyJsExpression

source§

fn from(node: TsTypeAssertionExpression) -> AnyJsExpression

Converts to this type from the input type.
source§

impl Hash for AnyJsExpression

source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
source§

impl PartialEq for AnyJsExpression

source§

fn eq(&self, other: &AnyJsExpression) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl Eq for AnyJsExpression

source§

impl StructuralPartialEq for AnyJsExpression

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> AstNodeExt for T
where T: AstNode,

source§

fn replace_node_discard_trivia<N>(self, prev_node: N, next_node: N) -> Option<T>
where N: AstNode<Language = <T as AstNode>::Language>,

Return a new version of this node with the node prev_node replaced with next_node Read more
source§

fn replace_node<N>(self, prev_node: N, next_node: N) -> Option<T>
where N: AstNode<Language = <T as AstNode>::Language>,

Return a new version of this node with the node prev_node replaced with next_node, transfering the leading and trailing trivia of prev_node to next_node Read more
source§

fn replace_token_discard_trivia( self, prev_token: SyntaxToken<<T as AstNode>::Language>, next_token: SyntaxToken<<T as AstNode>::Language> ) -> Option<T>

Return a new version of this node with the token prev_token replaced with next_token Read more
source§

fn replace_token( self, prev_token: SyntaxToken<<T as AstNode>::Language>, next_token: SyntaxToken<<T as AstNode>::Language> ) -> Option<T>

Return a new version of this node with the token prev_token replaced with next_token, transfering the leading and trailing trivia of prev_token to next_token Read more
source§

fn detach(self) -> T

source§

impl<L, T> BatchMutationExt<L> for T
where L: Language, T: AstNode<Language = L>,

source§

fn begin(self) -> BatchMutation<L>

It starts a BatchMutation
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> DynClone for T
where T: Clone,

source§

fn __clone_box(&self, _: Private) -> *mut ()

source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T> Instrument for T

source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T> ToString for T
where T: Display + ?Sized,

source§

default fn to_string(&self) -> String

Converts the given value to a String. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<T> WithSubscriber for T

source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more