Enum swc_ecma_visit::AstParentKind
source · pub enum AstParentKind {
Show 221 variants
Class(ClassField),
ClassMember(ClassMemberField),
ClassProp(ClassPropField),
PrivateProp(PrivatePropField),
ClassMethod(ClassMethodField),
PrivateMethod(PrivateMethodField),
Constructor(ConstructorField),
Decorator(DecoratorField),
StaticBlock(StaticBlockField),
Decl(DeclField),
FnDecl(FnDeclField),
ClassDecl(ClassDeclField),
VarDecl(VarDeclField),
VarDeclarator(VarDeclaratorField),
Expr(ExprField),
ThisExpr(ThisExprField),
ArrayLit(ArrayLitField),
ObjectLit(ObjectLitField),
PropOrSpread(PropOrSpreadField),
SpreadElement(SpreadElementField),
UnaryExpr(UnaryExprField),
UpdateExpr(UpdateExprField),
BinExpr(BinExprField),
FnExpr(FnExprField),
ClassExpr(ClassExprField),
AssignExpr(AssignExprField),
MemberExpr(MemberExprField),
MemberProp(MemberPropField),
SuperPropExpr(SuperPropExprField),
SuperProp(SuperPropField),
CondExpr(CondExprField),
CallExpr(CallExprField),
NewExpr(NewExprField),
SeqExpr(SeqExprField),
ArrowExpr(ArrowExprField),
YieldExpr(YieldExprField),
MetaPropExpr(MetaPropExprField),
AwaitExpr(AwaitExprField),
Tpl(TplField),
TaggedTpl(TaggedTplField),
TplElement(TplElementField),
ParenExpr(ParenExprField),
Callee(CalleeField),
Super(SuperField),
Import(ImportField),
ExprOrSpread(ExprOrSpreadField),
BlockStmtOrExpr(BlockStmtOrExprField),
AssignTarget(AssignTargetField),
AssignTargetPat(AssignTargetPatField),
SimpleAssignTarget(SimpleAssignTargetField),
OptChainExpr(OptChainExprField),
OptChainBase(OptChainBaseField),
OptCall(OptCallField),
Function(FunctionField),
Param(ParamField),
ParamOrTsParamProp(ParamOrTsParamPropField),
BindingIdent(BindingIdentField),
Ident(IdentField),
PrivateName(PrivateNameField),
JSXObject(JSXObjectField),
JSXMemberExpr(JSXMemberExprField),
JSXNamespacedName(JSXNamespacedNameField),
JSXEmptyExpr(JSXEmptyExprField),
JSXExprContainer(JSXExprContainerField),
JSXExpr(JSXExprField),
JSXSpreadChild(JSXSpreadChildField),
JSXElementName(JSXElementNameField),
JSXOpeningElement(JSXOpeningElementField),
JSXAttrOrSpread(JSXAttrOrSpreadField),
JSXClosingElement(JSXClosingElementField),
JSXAttr(JSXAttrField),
JSXAttrName(JSXAttrNameField),
JSXAttrValue(JSXAttrValueField),
JSXText(JSXTextField),
JSXElement(JSXElementField),
JSXElementChild(JSXElementChildField),
JSXFragment(JSXFragmentField),
JSXOpeningFragment(JSXOpeningFragmentField),
JSXClosingFragment(JSXClosingFragmentField),
Invalid(InvalidField),
Lit(LitField),
BigInt(BigIntField),
Str(StrField),
Bool(BoolField),
Null(NullField),
Regex(RegexField),
Number(NumberField),
Program(ProgramField),
Module(ModuleField),
Script(ScriptField),
ModuleItem(ModuleItemField),
ModuleDecl(ModuleDeclField),
ExportDefaultExpr(ExportDefaultExprField),
ExportDecl(ExportDeclField),
ImportDecl(ImportDeclField),
ExportAll(ExportAllField),
NamedExport(NamedExportField),
ExportDefaultDecl(ExportDefaultDeclField),
DefaultDecl(DefaultDeclField),
ImportSpecifier(ImportSpecifierField),
ImportDefaultSpecifier(ImportDefaultSpecifierField),
ImportStarAsSpecifier(ImportStarAsSpecifierField),
ImportNamedSpecifier(ImportNamedSpecifierField),
ExportSpecifier(ExportSpecifierField),
ExportNamespaceSpecifier(ExportNamespaceSpecifierField),
ExportDefaultSpecifier(ExportDefaultSpecifierField),
ModuleExportName(ModuleExportNameField),
ExportNamedSpecifier(ExportNamedSpecifierField),
Pat(PatField),
ArrayPat(ArrayPatField),
ObjectPat(ObjectPatField),
AssignPat(AssignPatField),
RestPat(RestPatField),
ObjectPatProp(ObjectPatPropField),
KeyValuePatProp(KeyValuePatPropField),
AssignPatProp(AssignPatPropField),
Prop(PropField),
KeyValueProp(KeyValuePropField),
AssignProp(AssignPropField),
GetterProp(GetterPropField),
SetterProp(SetterPropField),
MethodProp(MethodPropField),
PropName(PropNameField),
ComputedPropName(ComputedPropNameField),
BlockStmt(BlockStmtField),
Stmt(StmtField),
ExprStmt(ExprStmtField),
EmptyStmt(EmptyStmtField),
DebuggerStmt(DebuggerStmtField),
WithStmt(WithStmtField),
ReturnStmt(ReturnStmtField),
LabeledStmt(LabeledStmtField),
BreakStmt(BreakStmtField),
ContinueStmt(ContinueStmtField),
IfStmt(IfStmtField),
SwitchStmt(SwitchStmtField),
ThrowStmt(ThrowStmtField),
TryStmt(TryStmtField),
WhileStmt(WhileStmtField),
DoWhileStmt(DoWhileStmtField),
ForStmt(ForStmtField),
ForInStmt(ForInStmtField),
ForOfStmt(ForOfStmtField),
SwitchCase(SwitchCaseField),
CatchClause(CatchClauseField),
ForHead(ForHeadField),
VarDeclOrExpr(VarDeclOrExprField),
TsTypeAnn(TsTypeAnnField),
TsTypeParamDecl(TsTypeParamDeclField),
TsTypeParam(TsTypeParamField),
TsTypeParamInstantiation(TsTypeParamInstantiationField),
TsParamProp(TsParamPropField),
TsParamPropParam(TsParamPropParamField),
TsQualifiedName(TsQualifiedNameField),
TsEntityName(TsEntityNameField),
TsTypeElement(TsTypeElementField),
TsCallSignatureDecl(TsCallSignatureDeclField),
TsConstructSignatureDecl(TsConstructSignatureDeclField),
TsPropertySignature(TsPropertySignatureField),
TsGetterSignature(TsGetterSignatureField),
TsSetterSignature(TsSetterSignatureField),
TsMethodSignature(TsMethodSignatureField),
TsIndexSignature(TsIndexSignatureField),
TsType(TsTypeField),
TsFnOrConstructorType(TsFnOrConstructorTypeField),
TsKeywordType(TsKeywordTypeField),
TsThisType(TsThisTypeField),
TsFnParam(TsFnParamField),
TsFnType(TsFnTypeField),
TsConstructorType(TsConstructorTypeField),
TsTypeRef(TsTypeRefField),
TsTypePredicate(TsTypePredicateField),
TsThisTypeOrIdent(TsThisTypeOrIdentField),
TsTypeQuery(TsTypeQueryField),
TsTypeQueryExpr(TsTypeQueryExprField),
TsImportType(TsImportTypeField),
TsTypeLit(TsTypeLitField),
TsArrayType(TsArrayTypeField),
TsTupleType(TsTupleTypeField),
TsTupleElement(TsTupleElementField),
TsOptionalType(TsOptionalTypeField),
TsRestType(TsRestTypeField),
TsUnionOrIntersectionType(TsUnionOrIntersectionTypeField),
TsUnionType(TsUnionTypeField),
TsIntersectionType(TsIntersectionTypeField),
TsConditionalType(TsConditionalTypeField),
TsInferType(TsInferTypeField),
TsParenthesizedType(TsParenthesizedTypeField),
TsTypeOperator(TsTypeOperatorField),
TsIndexedAccessType(TsIndexedAccessTypeField),
TsMappedType(TsMappedTypeField),
TsLitType(TsLitTypeField),
TsLit(TsLitField),
TsTplLitType(TsTplLitTypeField),
TsInterfaceDecl(TsInterfaceDeclField),
TsInterfaceBody(TsInterfaceBodyField),
TsExprWithTypeArgs(TsExprWithTypeArgsField),
TsTypeAliasDecl(TsTypeAliasDeclField),
TsEnumDecl(TsEnumDeclField),
TsEnumMember(TsEnumMemberField),
TsEnumMemberId(TsEnumMemberIdField),
TsModuleDecl(TsModuleDeclField),
TsNamespaceBody(TsNamespaceBodyField),
TsModuleBlock(TsModuleBlockField),
TsNamespaceDecl(TsNamespaceDeclField),
TsModuleName(TsModuleNameField),
TsImportEqualsDecl(TsImportEqualsDeclField),
TsModuleRef(TsModuleRefField),
TsExternalModuleRef(TsExternalModuleRefField),
TsExportAssignment(TsExportAssignmentField),
TsNamespaceExportDecl(TsNamespaceExportDeclField),
TsAsExpr(TsAsExprField),
TsTypeAssertion(TsTypeAssertionField),
TsNonNullExpr(TsNonNullExprField),
TsConstAssertion(TsConstAssertionField),
TsInstantiation(TsInstantiationField),
TsSatisfiesExpr(TsSatisfiesExprField),
ReservedUnused(ReservedUnusedField),
AutoAccessor(AutoAccessorField),
Key(KeyField),
UsingDecl(UsingDeclField),
}
Variants§
Class(ClassField)
ClassMember(ClassMemberField)
ClassProp(ClassPropField)
PrivateProp(PrivatePropField)
ClassMethod(ClassMethodField)
PrivateMethod(PrivateMethodField)
Constructor(ConstructorField)
Decorator(DecoratorField)
StaticBlock(StaticBlockField)
Decl(DeclField)
FnDecl(FnDeclField)
ClassDecl(ClassDeclField)
VarDecl(VarDeclField)
VarDeclarator(VarDeclaratorField)
Expr(ExprField)
ThisExpr(ThisExprField)
ArrayLit(ArrayLitField)
ObjectLit(ObjectLitField)
PropOrSpread(PropOrSpreadField)
SpreadElement(SpreadElementField)
UnaryExpr(UnaryExprField)
UpdateExpr(UpdateExprField)
BinExpr(BinExprField)
FnExpr(FnExprField)
ClassExpr(ClassExprField)
AssignExpr(AssignExprField)
MemberExpr(MemberExprField)
MemberProp(MemberPropField)
SuperPropExpr(SuperPropExprField)
SuperProp(SuperPropField)
CondExpr(CondExprField)
CallExpr(CallExprField)
NewExpr(NewExprField)
SeqExpr(SeqExprField)
ArrowExpr(ArrowExprField)
YieldExpr(YieldExprField)
MetaPropExpr(MetaPropExprField)
AwaitExpr(AwaitExprField)
Tpl(TplField)
TaggedTpl(TaggedTplField)
TplElement(TplElementField)
ParenExpr(ParenExprField)
Callee(CalleeField)
Super(SuperField)
Import(ImportField)
ExprOrSpread(ExprOrSpreadField)
BlockStmtOrExpr(BlockStmtOrExprField)
AssignTarget(AssignTargetField)
AssignTargetPat(AssignTargetPatField)
SimpleAssignTarget(SimpleAssignTargetField)
OptChainExpr(OptChainExprField)
OptChainBase(OptChainBaseField)
OptCall(OptCallField)
Function(FunctionField)
Param(ParamField)
ParamOrTsParamProp(ParamOrTsParamPropField)
BindingIdent(BindingIdentField)
Ident(IdentField)
PrivateName(PrivateNameField)
JSXObject(JSXObjectField)
JSXMemberExpr(JSXMemberExprField)
JSXNamespacedName(JSXNamespacedNameField)
JSXEmptyExpr(JSXEmptyExprField)
JSXExprContainer(JSXExprContainerField)
JSXExpr(JSXExprField)
JSXSpreadChild(JSXSpreadChildField)
JSXElementName(JSXElementNameField)
JSXOpeningElement(JSXOpeningElementField)
JSXAttrOrSpread(JSXAttrOrSpreadField)
JSXClosingElement(JSXClosingElementField)
JSXAttr(JSXAttrField)
JSXAttrName(JSXAttrNameField)
JSXAttrValue(JSXAttrValueField)
JSXText(JSXTextField)
JSXElement(JSXElementField)
JSXElementChild(JSXElementChildField)
JSXFragment(JSXFragmentField)
JSXOpeningFragment(JSXOpeningFragmentField)
JSXClosingFragment(JSXClosingFragmentField)
Invalid(InvalidField)
Lit(LitField)
BigInt(BigIntField)
Str(StrField)
Bool(BoolField)
Null(NullField)
Regex(RegexField)
Number(NumberField)
Program(ProgramField)
Module(ModuleField)
Script(ScriptField)
ModuleItem(ModuleItemField)
ModuleDecl(ModuleDeclField)
ExportDefaultExpr(ExportDefaultExprField)
ExportDecl(ExportDeclField)
ImportDecl(ImportDeclField)
ExportAll(ExportAllField)
NamedExport(NamedExportField)
ExportDefaultDecl(ExportDefaultDeclField)
DefaultDecl(DefaultDeclField)
ImportSpecifier(ImportSpecifierField)
ImportDefaultSpecifier(ImportDefaultSpecifierField)
ImportStarAsSpecifier(ImportStarAsSpecifierField)
ImportNamedSpecifier(ImportNamedSpecifierField)
ExportSpecifier(ExportSpecifierField)
ExportNamespaceSpecifier(ExportNamespaceSpecifierField)
ExportDefaultSpecifier(ExportDefaultSpecifierField)
ModuleExportName(ModuleExportNameField)
ExportNamedSpecifier(ExportNamedSpecifierField)
Pat(PatField)
ArrayPat(ArrayPatField)
ObjectPat(ObjectPatField)
AssignPat(AssignPatField)
RestPat(RestPatField)
ObjectPatProp(ObjectPatPropField)
KeyValuePatProp(KeyValuePatPropField)
AssignPatProp(AssignPatPropField)
Prop(PropField)
KeyValueProp(KeyValuePropField)
AssignProp(AssignPropField)
GetterProp(GetterPropField)
SetterProp(SetterPropField)
MethodProp(MethodPropField)
PropName(PropNameField)
ComputedPropName(ComputedPropNameField)
BlockStmt(BlockStmtField)
Stmt(StmtField)
ExprStmt(ExprStmtField)
EmptyStmt(EmptyStmtField)
DebuggerStmt(DebuggerStmtField)
WithStmt(WithStmtField)
ReturnStmt(ReturnStmtField)
LabeledStmt(LabeledStmtField)
BreakStmt(BreakStmtField)
ContinueStmt(ContinueStmtField)
IfStmt(IfStmtField)
SwitchStmt(SwitchStmtField)
ThrowStmt(ThrowStmtField)
TryStmt(TryStmtField)
WhileStmt(WhileStmtField)
DoWhileStmt(DoWhileStmtField)
ForStmt(ForStmtField)
ForInStmt(ForInStmtField)
ForOfStmt(ForOfStmtField)
SwitchCase(SwitchCaseField)
CatchClause(CatchClauseField)
ForHead(ForHeadField)
VarDeclOrExpr(VarDeclOrExprField)
TsTypeAnn(TsTypeAnnField)
TsTypeParamDecl(TsTypeParamDeclField)
TsTypeParam(TsTypeParamField)
TsTypeParamInstantiation(TsTypeParamInstantiationField)
TsParamProp(TsParamPropField)
TsParamPropParam(TsParamPropParamField)
TsQualifiedName(TsQualifiedNameField)
TsEntityName(TsEntityNameField)
TsTypeElement(TsTypeElementField)
TsCallSignatureDecl(TsCallSignatureDeclField)
TsConstructSignatureDecl(TsConstructSignatureDeclField)
TsPropertySignature(TsPropertySignatureField)
TsGetterSignature(TsGetterSignatureField)
TsSetterSignature(TsSetterSignatureField)
TsMethodSignature(TsMethodSignatureField)
TsIndexSignature(TsIndexSignatureField)
TsType(TsTypeField)
TsFnOrConstructorType(TsFnOrConstructorTypeField)
TsKeywordType(TsKeywordTypeField)
TsThisType(TsThisTypeField)
TsFnParam(TsFnParamField)
TsFnType(TsFnTypeField)
TsConstructorType(TsConstructorTypeField)
TsTypeRef(TsTypeRefField)
TsTypePredicate(TsTypePredicateField)
TsThisTypeOrIdent(TsThisTypeOrIdentField)
TsTypeQuery(TsTypeQueryField)
TsTypeQueryExpr(TsTypeQueryExprField)
TsImportType(TsImportTypeField)
TsTypeLit(TsTypeLitField)
TsArrayType(TsArrayTypeField)
TsTupleType(TsTupleTypeField)
TsTupleElement(TsTupleElementField)
TsOptionalType(TsOptionalTypeField)
TsRestType(TsRestTypeField)
TsUnionOrIntersectionType(TsUnionOrIntersectionTypeField)
TsUnionType(TsUnionTypeField)
TsIntersectionType(TsIntersectionTypeField)
TsConditionalType(TsConditionalTypeField)
TsInferType(TsInferTypeField)
TsParenthesizedType(TsParenthesizedTypeField)
TsTypeOperator(TsTypeOperatorField)
TsIndexedAccessType(TsIndexedAccessTypeField)
TsMappedType(TsMappedTypeField)
TsLitType(TsLitTypeField)
TsLit(TsLitField)
TsTplLitType(TsTplLitTypeField)
TsInterfaceDecl(TsInterfaceDeclField)
TsInterfaceBody(TsInterfaceBodyField)
TsExprWithTypeArgs(TsExprWithTypeArgsField)
TsTypeAliasDecl(TsTypeAliasDeclField)
TsEnumDecl(TsEnumDeclField)
TsEnumMember(TsEnumMemberField)
TsEnumMemberId(TsEnumMemberIdField)
TsModuleDecl(TsModuleDeclField)
TsNamespaceBody(TsNamespaceBodyField)
TsModuleBlock(TsModuleBlockField)
TsNamespaceDecl(TsNamespaceDeclField)
TsModuleName(TsModuleNameField)
TsImportEqualsDecl(TsImportEqualsDeclField)
TsModuleRef(TsModuleRefField)
TsExternalModuleRef(TsExternalModuleRefField)
TsExportAssignment(TsExportAssignmentField)
TsNamespaceExportDecl(TsNamespaceExportDeclField)
TsAsExpr(TsAsExprField)
TsTypeAssertion(TsTypeAssertionField)
TsNonNullExpr(TsNonNullExprField)
TsConstAssertion(TsConstAssertionField)
TsInstantiation(TsInstantiationField)
TsSatisfiesExpr(TsSatisfiesExprField)
ReservedUnused(ReservedUnusedField)
AutoAccessor(AutoAccessorField)
Key(KeyField)
UsingDecl(UsingDeclField)
Trait Implementations§
source§impl Clone for AstParentKind
impl Clone for AstParentKind
source§fn clone(&self) -> AstParentKind
fn clone(&self) -> AstParentKind
Returns a copy 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 AstParentKind
impl Debug for AstParentKind
source§impl<'de> Deserialize<'de> for AstParentKind
impl<'de> Deserialize<'de> for AstParentKind
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
source§impl Hash for AstParentKind
impl Hash for AstParentKind
source§impl Ord for AstParentKind
impl Ord for AstParentKind
source§fn cmp(&self, other: &AstParentKind) -> Ordering
fn cmp(&self, other: &AstParentKind) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
source§impl ParentKind for AstParentKind
impl ParentKind for AstParentKind
source§impl PartialEq for AstParentKind
impl PartialEq for AstParentKind
source§fn eq(&self, other: &AstParentKind) -> bool
fn eq(&self, other: &AstParentKind) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd for AstParentKind
impl PartialOrd for AstParentKind
source§fn partial_cmp(&self, other: &AstParentKind) -> Option<Ordering>
fn partial_cmp(&self, other: &AstParentKind) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moresource§impl Serialize for AstParentKind
impl Serialize for AstParentKind
impl Copy for AstParentKind
impl Eq for AstParentKind
impl StructuralPartialEq for AstParentKind
Auto Trait Implementations§
impl Freeze for AstParentKind
impl RefUnwindSafe for AstParentKind
impl Send for AstParentKind
impl Sync for AstParentKind
impl Unpin for AstParentKind
impl UnwindSafe for AstParentKind
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
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more