#[repr(C)]pub enum Node<'gc> {
Show 271 variants
Empty(Empty<'gc>),
Metadata(Metadata<'gc>),
Program(Program<'gc>),
FunctionExpression(FunctionExpression<'gc>),
ArrowFunctionExpression(ArrowFunctionExpression<'gc>),
FunctionDeclaration(FunctionDeclaration<'gc>),
ComponentDeclaration(ComponentDeclaration<'gc>),
HookDeclaration(HookDeclaration<'gc>),
MatchStatement(MatchStatement<'gc>),
WhileStatement(WhileStatement<'gc>),
DoWhileStatement(DoWhileStatement<'gc>),
ForInStatement(ForInStatement<'gc>),
ForOfStatement(ForOfStatement<'gc>),
ForStatement(ForStatement<'gc>),
DebuggerStatement(DebuggerStatement<'gc>),
EmptyStatement(EmptyStatement<'gc>),
BlockStatement(BlockStatement<'gc>),
StaticBlock(StaticBlock<'gc>),
BreakStatement(BreakStatement<'gc>),
ContinueStatement(ContinueStatement<'gc>),
ThrowStatement(ThrowStatement<'gc>),
ReturnStatement(ReturnStatement<'gc>),
WithStatement(WithStatement<'gc>),
SwitchStatement(SwitchStatement<'gc>),
LabeledStatement(LabeledStatement<'gc>),
ExpressionStatement(ExpressionStatement<'gc>),
TryStatement(TryStatement<'gc>),
IfStatement(IfStatement<'gc>),
NullLiteral(NullLiteral<'gc>),
BooleanLiteral(BooleanLiteral<'gc>),
StringLiteral(StringLiteral<'gc>),
NumericLiteral(NumericLiteral<'gc>),
RegExpLiteral(RegExpLiteral<'gc>),
BigIntLiteral(BigIntLiteral<'gc>),
ThisExpression(ThisExpression<'gc>),
Super(Super<'gc>),
SequenceExpression(SequenceExpression<'gc>),
ObjectExpression(ObjectExpression<'gc>),
ArrayExpression(ArrayExpression<'gc>),
SpreadElement(SpreadElement<'gc>),
NewExpression(NewExpression<'gc>),
YieldExpression(YieldExpression<'gc>),
AwaitExpression(AwaitExpression<'gc>),
ImportExpression(ImportExpression<'gc>),
CallExpression(CallExpression<'gc>),
OptionalCallExpression(OptionalCallExpression<'gc>),
AssignmentExpression(AssignmentExpression<'gc>),
UnaryExpression(UnaryExpression<'gc>),
UpdateExpression(UpdateExpression<'gc>),
MemberExpression(MemberExpression<'gc>),
OptionalMemberExpression(OptionalMemberExpression<'gc>),
LogicalExpression(LogicalExpression<'gc>),
ConditionalExpression(ConditionalExpression<'gc>),
BinaryExpression(BinaryExpression<'gc>),
Directive(Directive<'gc>),
DirectiveLiteral(DirectiveLiteral<'gc>),
Identifier(Identifier<'gc>),
PrivateName(PrivateName<'gc>),
MetaProperty(MetaProperty<'gc>),
SwitchCase(SwitchCase<'gc>),
CatchClause(CatchClause<'gc>),
VariableDeclarator(VariableDeclarator<'gc>),
VariableDeclaration(VariableDeclaration<'gc>),
TemplateLiteral(TemplateLiteral<'gc>),
TaggedTemplateExpression(TaggedTemplateExpression<'gc>),
TemplateElement(TemplateElement<'gc>),
Property(Property<'gc>),
Decorator(Decorator<'gc>),
ClassDeclaration(ClassDeclaration<'gc>),
ClassExpression(ClassExpression<'gc>),
ClassBody(ClassBody<'gc>),
ClassProperty(ClassProperty<'gc>),
ClassPrivateProperty(ClassPrivateProperty<'gc>),
MethodDefinition(MethodDefinition<'gc>),
ImportDeclaration(ImportDeclaration<'gc>),
ImportSpecifier(ImportSpecifier<'gc>),
ImportDefaultSpecifier(ImportDefaultSpecifier<'gc>),
ImportNamespaceSpecifier(ImportNamespaceSpecifier<'gc>),
ImportAttribute(ImportAttribute<'gc>),
ExportNamedDeclaration(ExportNamedDeclaration<'gc>),
ExportSpecifier(ExportSpecifier<'gc>),
ExportNamespaceSpecifier(ExportNamespaceSpecifier<'gc>),
ExportDefaultDeclaration(ExportDefaultDeclaration<'gc>),
ExportAllDeclaration(ExportAllDeclaration<'gc>),
ObjectPattern(ObjectPattern<'gc>),
ArrayPattern(ArrayPattern<'gc>),
RestElement(RestElement<'gc>),
AssignmentPattern(AssignmentPattern<'gc>),
MatchStatementCase(MatchStatementCase<'gc>),
MatchExpression(MatchExpression<'gc>),
MatchExpressionCase(MatchExpressionCase<'gc>),
MatchWildcardPattern(MatchWildcardPattern<'gc>),
MatchLiteralPattern(MatchLiteralPattern<'gc>),
MatchUnaryPattern(MatchUnaryPattern<'gc>),
MatchIdentifierPattern(MatchIdentifierPattern<'gc>),
MatchBindingPattern(MatchBindingPattern<'gc>),
MatchObjectPattern(MatchObjectPattern<'gc>),
MatchArrayPattern(MatchArrayPattern<'gc>),
MatchOrPattern(MatchOrPattern<'gc>),
MatchAsPattern(MatchAsPattern<'gc>),
MatchMemberPattern(MatchMemberPattern<'gc>),
MatchInstancePattern(MatchInstancePattern<'gc>),
MatchObjectPatternProperty(MatchObjectPatternProperty<'gc>),
MatchInstanceObjectPattern(MatchInstanceObjectPattern<'gc>),
MatchRestPattern(MatchRestPattern<'gc>),
JSXIdentifier(JSXIdentifier<'gc>),
JSXMemberExpression(JSXMemberExpression<'gc>),
JSXNamespacedName(JSXNamespacedName<'gc>),
JSXEmptyExpression(JSXEmptyExpression<'gc>),
JSXExpressionContainer(JSXExpressionContainer<'gc>),
JSXSpreadChild(JSXSpreadChild<'gc>),
JSXOpeningElement(JSXOpeningElement<'gc>),
JSXClosingElement(JSXClosingElement<'gc>),
JSXAttribute(JSXAttribute<'gc>),
JSXSpreadAttribute(JSXSpreadAttribute<'gc>),
JSXStringLiteral(JSXStringLiteral<'gc>),
JSXText(JSXText<'gc>),
JSXElement(JSXElement<'gc>),
JSXFragment(JSXFragment<'gc>),
JSXOpeningFragment(JSXOpeningFragment<'gc>),
JSXClosingFragment(JSXClosingFragment<'gc>),
ExistsTypeAnnotation(ExistsTypeAnnotation<'gc>),
EmptyTypeAnnotation(EmptyTypeAnnotation<'gc>),
StringTypeAnnotation(StringTypeAnnotation<'gc>),
NumberTypeAnnotation(NumberTypeAnnotation<'gc>),
StringLiteralTypeAnnotation(StringLiteralTypeAnnotation<'gc>),
NumberLiteralTypeAnnotation(NumberLiteralTypeAnnotation<'gc>),
BigIntLiteralTypeAnnotation(BigIntLiteralTypeAnnotation<'gc>),
BooleanTypeAnnotation(BooleanTypeAnnotation<'gc>),
BooleanLiteralTypeAnnotation(BooleanLiteralTypeAnnotation<'gc>),
NullLiteralTypeAnnotation(NullLiteralTypeAnnotation<'gc>),
SymbolTypeAnnotation(SymbolTypeAnnotation<'gc>),
AnyTypeAnnotation(AnyTypeAnnotation<'gc>),
MixedTypeAnnotation(MixedTypeAnnotation<'gc>),
BigIntTypeAnnotation(BigIntTypeAnnotation<'gc>),
VoidTypeAnnotation(VoidTypeAnnotation<'gc>),
NeverTypeAnnotation(NeverTypeAnnotation<'gc>),
UnknownTypeAnnotation(UnknownTypeAnnotation<'gc>),
UndefinedTypeAnnotation(UndefinedTypeAnnotation<'gc>),
FunctionTypeAnnotation(FunctionTypeAnnotation<'gc>),
HookTypeAnnotation(HookTypeAnnotation<'gc>),
FunctionTypeParam(FunctionTypeParam<'gc>),
ComponentTypeAnnotation(ComponentTypeAnnotation<'gc>),
ComponentTypeParameter(ComponentTypeParameter<'gc>),
NullableTypeAnnotation(NullableTypeAnnotation<'gc>),
QualifiedTypeIdentifier(QualifiedTypeIdentifier<'gc>),
TypeofTypeAnnotation(TypeofTypeAnnotation<'gc>),
KeyofTypeAnnotation(KeyofTypeAnnotation<'gc>),
TypeOperator(TypeOperator<'gc>),
QualifiedTypeofIdentifier(QualifiedTypeofIdentifier<'gc>),
TupleTypeAnnotation(TupleTypeAnnotation<'gc>),
TupleTypeSpreadElement(TupleTypeSpreadElement<'gc>),
TupleTypeLabeledElement(TupleTypeLabeledElement<'gc>),
ArrayTypeAnnotation(ArrayTypeAnnotation<'gc>),
InferTypeAnnotation(InferTypeAnnotation<'gc>),
UnionTypeAnnotation(UnionTypeAnnotation<'gc>),
IntersectionTypeAnnotation(IntersectionTypeAnnotation<'gc>),
GenericTypeAnnotation(GenericTypeAnnotation<'gc>),
IndexedAccessType(IndexedAccessType<'gc>),
OptionalIndexedAccessType(OptionalIndexedAccessType<'gc>),
ConditionalTypeAnnotation(ConditionalTypeAnnotation<'gc>),
TypePredicate(TypePredicate<'gc>),
InterfaceTypeAnnotation(InterfaceTypeAnnotation<'gc>),
TypeAlias(TypeAlias<'gc>),
OpaqueType(OpaqueType<'gc>),
InterfaceDeclaration(InterfaceDeclaration<'gc>),
DeclareTypeAlias(DeclareTypeAlias<'gc>),
DeclareOpaqueType(DeclareOpaqueType<'gc>),
DeclareInterface(DeclareInterface<'gc>),
DeclareClass(DeclareClass<'gc>),
DeclareFunction(DeclareFunction<'gc>),
DeclareHook(DeclareHook<'gc>),
DeclareComponent(DeclareComponent<'gc>),
DeclareVariable(DeclareVariable<'gc>),
DeclareEnum(DeclareEnum<'gc>),
DeclareExportDeclaration(DeclareExportDeclaration<'gc>),
DeclareExportAllDeclaration(DeclareExportAllDeclaration<'gc>),
DeclareModule(DeclareModule<'gc>),
DeclareNamespace(DeclareNamespace<'gc>),
DeclareModuleExports(DeclareModuleExports<'gc>),
InterfaceExtends(InterfaceExtends<'gc>),
ClassImplements(ClassImplements<'gc>),
TypeAnnotation(TypeAnnotation<'gc>),
ObjectTypeAnnotation(ObjectTypeAnnotation<'gc>),
ObjectTypeProperty(ObjectTypeProperty<'gc>),
ObjectTypeSpreadProperty(ObjectTypeSpreadProperty<'gc>),
ObjectTypeInternalSlot(ObjectTypeInternalSlot<'gc>),
ObjectTypeCallProperty(ObjectTypeCallProperty<'gc>),
ObjectTypeIndexer(ObjectTypeIndexer<'gc>),
ObjectTypeMappedTypeProperty(ObjectTypeMappedTypeProperty<'gc>),
Variance(Variance<'gc>),
TypeParameterDeclaration(TypeParameterDeclaration<'gc>),
TypeParameter(TypeParameter<'gc>),
TypeParameterInstantiation(TypeParameterInstantiation<'gc>),
TypeCastExpression(TypeCastExpression<'gc>),
AsExpression(AsExpression<'gc>),
AsConstExpression(AsConstExpression<'gc>),
InferredPredicate(InferredPredicate<'gc>),
DeclaredPredicate(DeclaredPredicate<'gc>),
EnumDeclaration(EnumDeclaration<'gc>),
EnumStringBody(EnumStringBody<'gc>),
EnumNumberBody(EnumNumberBody<'gc>),
EnumBigIntBody(EnumBigIntBody<'gc>),
EnumBooleanBody(EnumBooleanBody<'gc>),
EnumSymbolBody(EnumSymbolBody<'gc>),
EnumDefaultedMember(EnumDefaultedMember<'gc>),
EnumStringMember(EnumStringMember<'gc>),
EnumNumberMember(EnumNumberMember<'gc>),
EnumBigIntMember(EnumBigIntMember<'gc>),
EnumBooleanMember(EnumBooleanMember<'gc>),
ComponentParameter(ComponentParameter<'gc>),
RecordDeclaration(RecordDeclaration<'gc>),
RecordDeclarationImplements(RecordDeclarationImplements<'gc>),
RecordDeclarationBody(RecordDeclarationBody<'gc>),
RecordDeclarationProperty(RecordDeclarationProperty<'gc>),
RecordDeclarationStaticProperty(RecordDeclarationStaticProperty<'gc>),
RecordExpression(RecordExpression<'gc>),
RecordExpressionProperties(RecordExpressionProperties<'gc>),
TSTypeAnnotation(TSTypeAnnotation<'gc>),
TSAnyKeyword(TSAnyKeyword<'gc>),
TSNumberKeyword(TSNumberKeyword<'gc>),
TSBooleanKeyword(TSBooleanKeyword<'gc>),
TSStringKeyword(TSStringKeyword<'gc>),
TSSymbolKeyword(TSSymbolKeyword<'gc>),
TSVoidKeyword(TSVoidKeyword<'gc>),
TSUndefinedKeyword(TSUndefinedKeyword<'gc>),
TSUnknownKeyword(TSUnknownKeyword<'gc>),
TSNeverKeyword(TSNeverKeyword<'gc>),
TSBigIntKeyword(TSBigIntKeyword<'gc>),
TSThisType(TSThisType<'gc>),
TSLiteralType(TSLiteralType<'gc>),
TSIndexedAccessType(TSIndexedAccessType<'gc>),
TSArrayType(TSArrayType<'gc>),
TSTypeReference(TSTypeReference<'gc>),
TSQualifiedName(TSQualifiedName<'gc>),
TSFunctionType(TSFunctionType<'gc>),
TSConstructorType(TSConstructorType<'gc>),
TSTypePredicate(TSTypePredicate<'gc>),
TSTupleType(TSTupleType<'gc>),
TSTypeAssertion(TSTypeAssertion<'gc>),
TSAsExpression(TSAsExpression<'gc>),
TSParameterProperty(TSParameterProperty<'gc>),
TSTypeAliasDeclaration(TSTypeAliasDeclaration<'gc>),
TSInterfaceDeclaration(TSInterfaceDeclaration<'gc>),
TSInterfaceHeritage(TSInterfaceHeritage<'gc>),
TSInterfaceBody(TSInterfaceBody<'gc>),
TSEnumDeclaration(TSEnumDeclaration<'gc>),
TSEnumMember(TSEnumMember<'gc>),
TSModuleDeclaration(TSModuleDeclaration<'gc>),
TSModuleBlock(TSModuleBlock<'gc>),
TSModuleMember(TSModuleMember<'gc>),
TSTypeParameterDeclaration(TSTypeParameterDeclaration<'gc>),
TSTypeParameter(TSTypeParameter<'gc>),
TSTypeParameterInstantiation(TSTypeParameterInstantiation<'gc>),
TSUnionType(TSUnionType<'gc>),
TSIntersectionType(TSIntersectionType<'gc>),
TSTypeQuery(TSTypeQuery<'gc>),
TSConditionalType(TSConditionalType<'gc>),
TSTypeLiteral(TSTypeLiteral<'gc>),
TSPropertySignature(TSPropertySignature<'gc>),
TSMethodSignature(TSMethodSignature<'gc>),
TSIndexSignature(TSIndexSignature<'gc>),
TSCallSignatureDeclaration(TSCallSignatureDeclaration<'gc>),
TSModifiers(TSModifiers<'gc>),
CoverEmptyArgs(CoverEmptyArgs<'gc>),
CoverTrailingComma(CoverTrailingComma<'gc>),
CoverInitializer(CoverInitializer<'gc>),
CoverRestElement(CoverRestElement<'gc>),
CoverTypedIdentifier(CoverTypedIdentifier<'gc>),
SHBuiltin(SHBuiltin<'gc>),
ImplicitCheckedCast(ImplicitCheckedCast<'gc>),
}Expand description
An AST node: one arm per ESTree.def node kind.
#[repr(C)], and each arm’s payload struct is named after the arm,
so a deep match compiles to a single dispatch. Nodes live in the
crate::context::Context arena and are handed out as &'gc Node
for as long as a crate::context::GCLock is held.
Variants§
Empty(Empty<'gc>)
A Empty node.
Metadata(Metadata<'gc>)
A Metadata node.
Program(Program<'gc>)
A Program node.
FunctionExpression(FunctionExpression<'gc>)
A FunctionExpression node.
ArrowFunctionExpression(ArrowFunctionExpression<'gc>)
A ArrowFunctionExpression node.
FunctionDeclaration(FunctionDeclaration<'gc>)
A FunctionDeclaration node.
ComponentDeclaration(ComponentDeclaration<'gc>)
A ComponentDeclaration node.
HookDeclaration(HookDeclaration<'gc>)
A HookDeclaration node.
MatchStatement(MatchStatement<'gc>)
A MatchStatement node.
WhileStatement(WhileStatement<'gc>)
A WhileStatement node.
DoWhileStatement(DoWhileStatement<'gc>)
A DoWhileStatement node.
ForInStatement(ForInStatement<'gc>)
A ForInStatement node.
ForOfStatement(ForOfStatement<'gc>)
A ForOfStatement node.
ForStatement(ForStatement<'gc>)
A ForStatement node.
DebuggerStatement(DebuggerStatement<'gc>)
A DebuggerStatement node.
EmptyStatement(EmptyStatement<'gc>)
A EmptyStatement node.
BlockStatement(BlockStatement<'gc>)
A BlockStatement node.
StaticBlock(StaticBlock<'gc>)
A StaticBlock node.
BreakStatement(BreakStatement<'gc>)
A BreakStatement node.
ContinueStatement(ContinueStatement<'gc>)
A ContinueStatement node.
ThrowStatement(ThrowStatement<'gc>)
A ThrowStatement node.
ReturnStatement(ReturnStatement<'gc>)
A ReturnStatement node.
WithStatement(WithStatement<'gc>)
A WithStatement node.
SwitchStatement(SwitchStatement<'gc>)
A SwitchStatement node.
LabeledStatement(LabeledStatement<'gc>)
A LabeledStatement node.
ExpressionStatement(ExpressionStatement<'gc>)
A ExpressionStatement node.
TryStatement(TryStatement<'gc>)
A TryStatement node.
IfStatement(IfStatement<'gc>)
A IfStatement node.
NullLiteral(NullLiteral<'gc>)
A NullLiteral node.
BooleanLiteral(BooleanLiteral<'gc>)
A BooleanLiteral node.
StringLiteral(StringLiteral<'gc>)
A StringLiteral node.
NumericLiteral(NumericLiteral<'gc>)
A NumericLiteral node.
RegExpLiteral(RegExpLiteral<'gc>)
A RegExpLiteral node.
BigIntLiteral(BigIntLiteral<'gc>)
A BigIntLiteral node.
ThisExpression(ThisExpression<'gc>)
A ThisExpression node.
Super(Super<'gc>)
A Super node.
SequenceExpression(SequenceExpression<'gc>)
A SequenceExpression node.
ObjectExpression(ObjectExpression<'gc>)
A ObjectExpression node.
ArrayExpression(ArrayExpression<'gc>)
A ArrayExpression node.
SpreadElement(SpreadElement<'gc>)
A SpreadElement node.
NewExpression(NewExpression<'gc>)
A NewExpression node.
YieldExpression(YieldExpression<'gc>)
A YieldExpression node.
AwaitExpression(AwaitExpression<'gc>)
A AwaitExpression node.
ImportExpression(ImportExpression<'gc>)
A ImportExpression node.
CallExpression(CallExpression<'gc>)
A CallExpression node.
OptionalCallExpression(OptionalCallExpression<'gc>)
A OptionalCallExpression node.
AssignmentExpression(AssignmentExpression<'gc>)
A AssignmentExpression node.
UnaryExpression(UnaryExpression<'gc>)
A UnaryExpression node.
UpdateExpression(UpdateExpression<'gc>)
A UpdateExpression node.
MemberExpression(MemberExpression<'gc>)
A MemberExpression node.
OptionalMemberExpression(OptionalMemberExpression<'gc>)
A OptionalMemberExpression node.
LogicalExpression(LogicalExpression<'gc>)
A LogicalExpression node.
ConditionalExpression(ConditionalExpression<'gc>)
A ConditionalExpression node.
BinaryExpression(BinaryExpression<'gc>)
A BinaryExpression node.
Directive(Directive<'gc>)
A Directive node.
DirectiveLiteral(DirectiveLiteral<'gc>)
A DirectiveLiteral node.
Identifier(Identifier<'gc>)
A Identifier node.
PrivateName(PrivateName<'gc>)
A PrivateName node.
MetaProperty(MetaProperty<'gc>)
A MetaProperty node.
SwitchCase(SwitchCase<'gc>)
A SwitchCase node.
CatchClause(CatchClause<'gc>)
A CatchClause node.
VariableDeclarator(VariableDeclarator<'gc>)
A VariableDeclarator node.
VariableDeclaration(VariableDeclaration<'gc>)
A VariableDeclaration node.
TemplateLiteral(TemplateLiteral<'gc>)
A TemplateLiteral node.
TaggedTemplateExpression(TaggedTemplateExpression<'gc>)
A TaggedTemplateExpression node.
TemplateElement(TemplateElement<'gc>)
A TemplateElement node.
Property(Property<'gc>)
A Property node.
Decorator(Decorator<'gc>)
A Decorator node.
ClassDeclaration(ClassDeclaration<'gc>)
A ClassDeclaration node.
ClassExpression(ClassExpression<'gc>)
A ClassExpression node.
ClassBody(ClassBody<'gc>)
A ClassBody node.
ClassProperty(ClassProperty<'gc>)
A ClassProperty node.
ClassPrivateProperty(ClassPrivateProperty<'gc>)
A ClassPrivateProperty node.
MethodDefinition(MethodDefinition<'gc>)
A MethodDefinition node.
ImportDeclaration(ImportDeclaration<'gc>)
A ImportDeclaration node.
ImportSpecifier(ImportSpecifier<'gc>)
A ImportSpecifier node.
ImportDefaultSpecifier(ImportDefaultSpecifier<'gc>)
A ImportDefaultSpecifier node.
ImportNamespaceSpecifier(ImportNamespaceSpecifier<'gc>)
A ImportNamespaceSpecifier node.
ImportAttribute(ImportAttribute<'gc>)
A ImportAttribute node.
ExportNamedDeclaration(ExportNamedDeclaration<'gc>)
A ExportNamedDeclaration node.
ExportSpecifier(ExportSpecifier<'gc>)
A ExportSpecifier node.
ExportNamespaceSpecifier(ExportNamespaceSpecifier<'gc>)
A ExportNamespaceSpecifier node.
ExportDefaultDeclaration(ExportDefaultDeclaration<'gc>)
A ExportDefaultDeclaration node.
ExportAllDeclaration(ExportAllDeclaration<'gc>)
A ExportAllDeclaration node.
ObjectPattern(ObjectPattern<'gc>)
A ObjectPattern node.
ArrayPattern(ArrayPattern<'gc>)
A ArrayPattern node.
RestElement(RestElement<'gc>)
A RestElement node.
AssignmentPattern(AssignmentPattern<'gc>)
A AssignmentPattern node.
MatchStatementCase(MatchStatementCase<'gc>)
A MatchStatementCase node.
MatchExpression(MatchExpression<'gc>)
A MatchExpression node.
MatchExpressionCase(MatchExpressionCase<'gc>)
A MatchExpressionCase node.
MatchWildcardPattern(MatchWildcardPattern<'gc>)
A MatchWildcardPattern node.
MatchLiteralPattern(MatchLiteralPattern<'gc>)
A MatchLiteralPattern node.
MatchUnaryPattern(MatchUnaryPattern<'gc>)
A MatchUnaryPattern node.
MatchIdentifierPattern(MatchIdentifierPattern<'gc>)
A MatchIdentifierPattern node.
MatchBindingPattern(MatchBindingPattern<'gc>)
A MatchBindingPattern node.
MatchObjectPattern(MatchObjectPattern<'gc>)
A MatchObjectPattern node.
MatchArrayPattern(MatchArrayPattern<'gc>)
A MatchArrayPattern node.
MatchOrPattern(MatchOrPattern<'gc>)
A MatchOrPattern node.
MatchAsPattern(MatchAsPattern<'gc>)
A MatchAsPattern node.
MatchMemberPattern(MatchMemberPattern<'gc>)
A MatchMemberPattern node.
MatchInstancePattern(MatchInstancePattern<'gc>)
A MatchInstancePattern node.
MatchObjectPatternProperty(MatchObjectPatternProperty<'gc>)
A MatchObjectPatternProperty node.
MatchInstanceObjectPattern(MatchInstanceObjectPattern<'gc>)
A MatchInstanceObjectPattern node.
MatchRestPattern(MatchRestPattern<'gc>)
A MatchRestPattern node.
JSXIdentifier(JSXIdentifier<'gc>)
A JSXIdentifier node.
JSXMemberExpression(JSXMemberExpression<'gc>)
A JSXMemberExpression node.
JSXNamespacedName(JSXNamespacedName<'gc>)
A JSXNamespacedName node.
JSXEmptyExpression(JSXEmptyExpression<'gc>)
A JSXEmptyExpression node.
JSXExpressionContainer(JSXExpressionContainer<'gc>)
A JSXExpressionContainer node.
JSXSpreadChild(JSXSpreadChild<'gc>)
A JSXSpreadChild node.
JSXOpeningElement(JSXOpeningElement<'gc>)
A JSXOpeningElement node.
JSXClosingElement(JSXClosingElement<'gc>)
A JSXClosingElement node.
JSXAttribute(JSXAttribute<'gc>)
A JSXAttribute node.
JSXSpreadAttribute(JSXSpreadAttribute<'gc>)
A JSXSpreadAttribute node.
JSXStringLiteral(JSXStringLiteral<'gc>)
A JSXStringLiteral node.
JSXText(JSXText<'gc>)
A JSXText node.
JSXElement(JSXElement<'gc>)
A JSXElement node.
JSXFragment(JSXFragment<'gc>)
A JSXFragment node.
JSXOpeningFragment(JSXOpeningFragment<'gc>)
A JSXOpeningFragment node.
JSXClosingFragment(JSXClosingFragment<'gc>)
A JSXClosingFragment node.
ExistsTypeAnnotation(ExistsTypeAnnotation<'gc>)
A ExistsTypeAnnotation node.
EmptyTypeAnnotation(EmptyTypeAnnotation<'gc>)
A EmptyTypeAnnotation node.
StringTypeAnnotation(StringTypeAnnotation<'gc>)
A StringTypeAnnotation node.
NumberTypeAnnotation(NumberTypeAnnotation<'gc>)
A NumberTypeAnnotation node.
StringLiteralTypeAnnotation(StringLiteralTypeAnnotation<'gc>)
A StringLiteralTypeAnnotation node.
NumberLiteralTypeAnnotation(NumberLiteralTypeAnnotation<'gc>)
A NumberLiteralTypeAnnotation node.
BigIntLiteralTypeAnnotation(BigIntLiteralTypeAnnotation<'gc>)
A BigIntLiteralTypeAnnotation node.
BooleanTypeAnnotation(BooleanTypeAnnotation<'gc>)
A BooleanTypeAnnotation node.
BooleanLiteralTypeAnnotation(BooleanLiteralTypeAnnotation<'gc>)
A BooleanLiteralTypeAnnotation node.
NullLiteralTypeAnnotation(NullLiteralTypeAnnotation<'gc>)
A NullLiteralTypeAnnotation node.
SymbolTypeAnnotation(SymbolTypeAnnotation<'gc>)
A SymbolTypeAnnotation node.
AnyTypeAnnotation(AnyTypeAnnotation<'gc>)
A AnyTypeAnnotation node.
MixedTypeAnnotation(MixedTypeAnnotation<'gc>)
A MixedTypeAnnotation node.
BigIntTypeAnnotation(BigIntTypeAnnotation<'gc>)
A BigIntTypeAnnotation node.
VoidTypeAnnotation(VoidTypeAnnotation<'gc>)
A VoidTypeAnnotation node.
NeverTypeAnnotation(NeverTypeAnnotation<'gc>)
A NeverTypeAnnotation node.
UnknownTypeAnnotation(UnknownTypeAnnotation<'gc>)
A UnknownTypeAnnotation node.
UndefinedTypeAnnotation(UndefinedTypeAnnotation<'gc>)
A UndefinedTypeAnnotation node.
FunctionTypeAnnotation(FunctionTypeAnnotation<'gc>)
A FunctionTypeAnnotation node.
HookTypeAnnotation(HookTypeAnnotation<'gc>)
A HookTypeAnnotation node.
FunctionTypeParam(FunctionTypeParam<'gc>)
A FunctionTypeParam node.
ComponentTypeAnnotation(ComponentTypeAnnotation<'gc>)
A ComponentTypeAnnotation node.
ComponentTypeParameter(ComponentTypeParameter<'gc>)
A ComponentTypeParameter node.
NullableTypeAnnotation(NullableTypeAnnotation<'gc>)
A NullableTypeAnnotation node.
QualifiedTypeIdentifier(QualifiedTypeIdentifier<'gc>)
A QualifiedTypeIdentifier node.
TypeofTypeAnnotation(TypeofTypeAnnotation<'gc>)
A TypeofTypeAnnotation node.
KeyofTypeAnnotation(KeyofTypeAnnotation<'gc>)
A KeyofTypeAnnotation node.
TypeOperator(TypeOperator<'gc>)
A TypeOperator node.
QualifiedTypeofIdentifier(QualifiedTypeofIdentifier<'gc>)
A QualifiedTypeofIdentifier node.
TupleTypeAnnotation(TupleTypeAnnotation<'gc>)
A TupleTypeAnnotation node.
TupleTypeSpreadElement(TupleTypeSpreadElement<'gc>)
A TupleTypeSpreadElement node.
TupleTypeLabeledElement(TupleTypeLabeledElement<'gc>)
A TupleTypeLabeledElement node.
ArrayTypeAnnotation(ArrayTypeAnnotation<'gc>)
A ArrayTypeAnnotation node.
InferTypeAnnotation(InferTypeAnnotation<'gc>)
A InferTypeAnnotation node.
UnionTypeAnnotation(UnionTypeAnnotation<'gc>)
A UnionTypeAnnotation node.
IntersectionTypeAnnotation(IntersectionTypeAnnotation<'gc>)
A IntersectionTypeAnnotation node.
GenericTypeAnnotation(GenericTypeAnnotation<'gc>)
A GenericTypeAnnotation node.
IndexedAccessType(IndexedAccessType<'gc>)
A IndexedAccessType node.
OptionalIndexedAccessType(OptionalIndexedAccessType<'gc>)
A OptionalIndexedAccessType node.
ConditionalTypeAnnotation(ConditionalTypeAnnotation<'gc>)
A ConditionalTypeAnnotation node.
TypePredicate(TypePredicate<'gc>)
A TypePredicate node.
InterfaceTypeAnnotation(InterfaceTypeAnnotation<'gc>)
A InterfaceTypeAnnotation node.
TypeAlias(TypeAlias<'gc>)
A TypeAlias node.
OpaqueType(OpaqueType<'gc>)
A OpaqueType node.
InterfaceDeclaration(InterfaceDeclaration<'gc>)
A InterfaceDeclaration node.
DeclareTypeAlias(DeclareTypeAlias<'gc>)
A DeclareTypeAlias node.
DeclareOpaqueType(DeclareOpaqueType<'gc>)
A DeclareOpaqueType node.
DeclareInterface(DeclareInterface<'gc>)
A DeclareInterface node.
DeclareClass(DeclareClass<'gc>)
A DeclareClass node.
DeclareFunction(DeclareFunction<'gc>)
A DeclareFunction node.
DeclareHook(DeclareHook<'gc>)
A DeclareHook node.
DeclareComponent(DeclareComponent<'gc>)
A DeclareComponent node.
DeclareVariable(DeclareVariable<'gc>)
A DeclareVariable node.
DeclareEnum(DeclareEnum<'gc>)
A DeclareEnum node.
DeclareExportDeclaration(DeclareExportDeclaration<'gc>)
A DeclareExportDeclaration node.
DeclareExportAllDeclaration(DeclareExportAllDeclaration<'gc>)
A DeclareExportAllDeclaration node.
DeclareModule(DeclareModule<'gc>)
A DeclareModule node.
DeclareNamespace(DeclareNamespace<'gc>)
A DeclareNamespace node.
DeclareModuleExports(DeclareModuleExports<'gc>)
A DeclareModuleExports node.
InterfaceExtends(InterfaceExtends<'gc>)
A InterfaceExtends node.
ClassImplements(ClassImplements<'gc>)
A ClassImplements node.
TypeAnnotation(TypeAnnotation<'gc>)
A TypeAnnotation node.
ObjectTypeAnnotation(ObjectTypeAnnotation<'gc>)
A ObjectTypeAnnotation node.
ObjectTypeProperty(ObjectTypeProperty<'gc>)
A ObjectTypeProperty node.
ObjectTypeSpreadProperty(ObjectTypeSpreadProperty<'gc>)
A ObjectTypeSpreadProperty node.
ObjectTypeInternalSlot(ObjectTypeInternalSlot<'gc>)
A ObjectTypeInternalSlot node.
ObjectTypeCallProperty(ObjectTypeCallProperty<'gc>)
A ObjectTypeCallProperty node.
ObjectTypeIndexer(ObjectTypeIndexer<'gc>)
A ObjectTypeIndexer node.
ObjectTypeMappedTypeProperty(ObjectTypeMappedTypeProperty<'gc>)
A ObjectTypeMappedTypeProperty node.
Variance(Variance<'gc>)
A Variance node.
TypeParameterDeclaration(TypeParameterDeclaration<'gc>)
A TypeParameterDeclaration node.
TypeParameter(TypeParameter<'gc>)
A TypeParameter node.
TypeParameterInstantiation(TypeParameterInstantiation<'gc>)
A TypeParameterInstantiation node.
TypeCastExpression(TypeCastExpression<'gc>)
A TypeCastExpression node.
AsExpression(AsExpression<'gc>)
A AsExpression node.
AsConstExpression(AsConstExpression<'gc>)
A AsConstExpression node.
InferredPredicate(InferredPredicate<'gc>)
A InferredPredicate node.
DeclaredPredicate(DeclaredPredicate<'gc>)
A DeclaredPredicate node.
EnumDeclaration(EnumDeclaration<'gc>)
A EnumDeclaration node.
EnumStringBody(EnumStringBody<'gc>)
A EnumStringBody node.
EnumNumberBody(EnumNumberBody<'gc>)
A EnumNumberBody node.
EnumBigIntBody(EnumBigIntBody<'gc>)
A EnumBigIntBody node.
EnumBooleanBody(EnumBooleanBody<'gc>)
A EnumBooleanBody node.
EnumSymbolBody(EnumSymbolBody<'gc>)
A EnumSymbolBody node.
EnumDefaultedMember(EnumDefaultedMember<'gc>)
A EnumDefaultedMember node.
EnumStringMember(EnumStringMember<'gc>)
A EnumStringMember node.
EnumNumberMember(EnumNumberMember<'gc>)
A EnumNumberMember node.
EnumBigIntMember(EnumBigIntMember<'gc>)
A EnumBigIntMember node.
EnumBooleanMember(EnumBooleanMember<'gc>)
A EnumBooleanMember node.
ComponentParameter(ComponentParameter<'gc>)
A ComponentParameter node.
RecordDeclaration(RecordDeclaration<'gc>)
A RecordDeclaration node.
RecordDeclarationImplements(RecordDeclarationImplements<'gc>)
A RecordDeclarationImplements node.
RecordDeclarationBody(RecordDeclarationBody<'gc>)
A RecordDeclarationBody node.
RecordDeclarationProperty(RecordDeclarationProperty<'gc>)
A RecordDeclarationProperty node.
RecordDeclarationStaticProperty(RecordDeclarationStaticProperty<'gc>)
A RecordDeclarationStaticProperty node.
RecordExpression(RecordExpression<'gc>)
A RecordExpression node.
RecordExpressionProperties(RecordExpressionProperties<'gc>)
A RecordExpressionProperties node.
TSTypeAnnotation(TSTypeAnnotation<'gc>)
A TSTypeAnnotation node.
TSAnyKeyword(TSAnyKeyword<'gc>)
A TSAnyKeyword node.
TSNumberKeyword(TSNumberKeyword<'gc>)
A TSNumberKeyword node.
TSBooleanKeyword(TSBooleanKeyword<'gc>)
A TSBooleanKeyword node.
TSStringKeyword(TSStringKeyword<'gc>)
A TSStringKeyword node.
TSSymbolKeyword(TSSymbolKeyword<'gc>)
A TSSymbolKeyword node.
TSVoidKeyword(TSVoidKeyword<'gc>)
A TSVoidKeyword node.
TSUndefinedKeyword(TSUndefinedKeyword<'gc>)
A TSUndefinedKeyword node.
TSUnknownKeyword(TSUnknownKeyword<'gc>)
A TSUnknownKeyword node.
TSNeverKeyword(TSNeverKeyword<'gc>)
A TSNeverKeyword node.
TSBigIntKeyword(TSBigIntKeyword<'gc>)
A TSBigIntKeyword node.
TSThisType(TSThisType<'gc>)
A TSThisType node.
TSLiteralType(TSLiteralType<'gc>)
A TSLiteralType node.
TSIndexedAccessType(TSIndexedAccessType<'gc>)
A TSIndexedAccessType node.
TSArrayType(TSArrayType<'gc>)
A TSArrayType node.
TSTypeReference(TSTypeReference<'gc>)
A TSTypeReference node.
TSQualifiedName(TSQualifiedName<'gc>)
A TSQualifiedName node.
TSFunctionType(TSFunctionType<'gc>)
A TSFunctionType node.
TSConstructorType(TSConstructorType<'gc>)
A TSConstructorType node.
TSTypePredicate(TSTypePredicate<'gc>)
A TSTypePredicate node.
TSTupleType(TSTupleType<'gc>)
A TSTupleType node.
TSTypeAssertion(TSTypeAssertion<'gc>)
A TSTypeAssertion node.
TSAsExpression(TSAsExpression<'gc>)
A TSAsExpression node.
TSParameterProperty(TSParameterProperty<'gc>)
A TSParameterProperty node.
TSTypeAliasDeclaration(TSTypeAliasDeclaration<'gc>)
A TSTypeAliasDeclaration node.
TSInterfaceDeclaration(TSInterfaceDeclaration<'gc>)
A TSInterfaceDeclaration node.
TSInterfaceHeritage(TSInterfaceHeritage<'gc>)
A TSInterfaceHeritage node.
TSInterfaceBody(TSInterfaceBody<'gc>)
A TSInterfaceBody node.
TSEnumDeclaration(TSEnumDeclaration<'gc>)
A TSEnumDeclaration node.
TSEnumMember(TSEnumMember<'gc>)
A TSEnumMember node.
TSModuleDeclaration(TSModuleDeclaration<'gc>)
A TSModuleDeclaration node.
TSModuleBlock(TSModuleBlock<'gc>)
A TSModuleBlock node.
TSModuleMember(TSModuleMember<'gc>)
A TSModuleMember node.
TSTypeParameterDeclaration(TSTypeParameterDeclaration<'gc>)
A TSTypeParameterDeclaration node.
TSTypeParameter(TSTypeParameter<'gc>)
A TSTypeParameter node.
TSTypeParameterInstantiation(TSTypeParameterInstantiation<'gc>)
A TSTypeParameterInstantiation node.
TSUnionType(TSUnionType<'gc>)
A TSUnionType node.
TSIntersectionType(TSIntersectionType<'gc>)
A TSIntersectionType node.
TSTypeQuery(TSTypeQuery<'gc>)
A TSTypeQuery node.
TSConditionalType(TSConditionalType<'gc>)
A TSConditionalType node.
TSTypeLiteral(TSTypeLiteral<'gc>)
A TSTypeLiteral node.
TSPropertySignature(TSPropertySignature<'gc>)
A TSPropertySignature node.
TSMethodSignature(TSMethodSignature<'gc>)
A TSMethodSignature node.
TSIndexSignature(TSIndexSignature<'gc>)
A TSIndexSignature node.
TSCallSignatureDeclaration(TSCallSignatureDeclaration<'gc>)
A TSCallSignatureDeclaration node.
TSModifiers(TSModifiers<'gc>)
A TSModifiers node.
CoverEmptyArgs(CoverEmptyArgs<'gc>)
A CoverEmptyArgs node.
CoverTrailingComma(CoverTrailingComma<'gc>)
A CoverTrailingComma node.
CoverInitializer(CoverInitializer<'gc>)
A CoverInitializer node.
CoverRestElement(CoverRestElement<'gc>)
A CoverRestElement node.
CoverTypedIdentifier(CoverTypedIdentifier<'gc>)
A CoverTypedIdentifier node.
SHBuiltin(SHBuiltin<'gc>)
A SHBuiltin node.
ImplicitCheckedCast(ImplicitCheckedCast<'gc>)
A ImplicitCheckedCast node.
Implementations§
Source§impl<'gc> Node<'gc>
impl<'gc> Node<'gc>
Sourcepub fn metadata(&self) -> &NodeMetadata<'gc>
pub fn metadata(&self) -> &NodeMetadata<'gc>
This node’s metadata, common to every kind.
Sourcepub fn is_function_like(&self) -> bool
pub fn is_function_like(&self) -> bool
Whether this node’s kind is in the FunctionLike range.
Sourcepub fn is_statement(&self) -> bool
pub fn is_statement(&self) -> bool
Whether this node’s kind is in the Statement range.
Sourcepub fn is_loop_statement(&self) -> bool
pub fn is_loop_statement(&self) -> bool
Whether this node’s kind is in the LoopStatement range.
Sourcepub fn is_call_expression_like(&self) -> bool
pub fn is_call_expression_like(&self) -> bool
Whether this node’s kind is in the CallExpressionLike range.
Sourcepub fn is_member_expression_like(&self) -> bool
pub fn is_member_expression_like(&self) -> bool
Whether this node’s kind is in the MemberExpressionLike range.
Sourcepub fn is_class_like(&self) -> bool
pub fn is_class_like(&self) -> bool
Whether this node’s kind is in the ClassLike range.
Sourcepub fn is_pattern(&self) -> bool
pub fn is_pattern(&self) -> bool
Whether this node’s kind is in the Pattern range.
Sourcepub fn is_match_pattern(&self) -> bool
pub fn is_match_pattern(&self) -> bool
Whether this node’s kind is in the MatchPattern range.
Sourcepub fn as_metadata(&self) -> Option<&Metadata<'gc>>
pub fn as_metadata(&self) -> Option<&Metadata<'gc>>
The payload if this is a Metadata, None otherwise.
Sourcepub fn as_program(&self) -> Option<&Program<'gc>>
pub fn as_program(&self) -> Option<&Program<'gc>>
The payload if this is a Program, None otherwise.
Sourcepub fn as_function_expression(&self) -> Option<&FunctionExpression<'gc>>
pub fn as_function_expression(&self) -> Option<&FunctionExpression<'gc>>
The payload if this is a FunctionExpression, None otherwise.
Sourcepub fn as_arrow_function_expression(
&self,
) -> Option<&ArrowFunctionExpression<'gc>>
pub fn as_arrow_function_expression( &self, ) -> Option<&ArrowFunctionExpression<'gc>>
The payload if this is a ArrowFunctionExpression, None otherwise.
Sourcepub fn as_function_declaration(&self) -> Option<&FunctionDeclaration<'gc>>
pub fn as_function_declaration(&self) -> Option<&FunctionDeclaration<'gc>>
The payload if this is a FunctionDeclaration, None otherwise.
Sourcepub fn as_component_declaration(&self) -> Option<&ComponentDeclaration<'gc>>
pub fn as_component_declaration(&self) -> Option<&ComponentDeclaration<'gc>>
The payload if this is a ComponentDeclaration, None otherwise.
Sourcepub fn as_hook_declaration(&self) -> Option<&HookDeclaration<'gc>>
pub fn as_hook_declaration(&self) -> Option<&HookDeclaration<'gc>>
The payload if this is a HookDeclaration, None otherwise.
Sourcepub fn as_match_statement(&self) -> Option<&MatchStatement<'gc>>
pub fn as_match_statement(&self) -> Option<&MatchStatement<'gc>>
The payload if this is a MatchStatement, None otherwise.
Sourcepub fn as_while_statement(&self) -> Option<&WhileStatement<'gc>>
pub fn as_while_statement(&self) -> Option<&WhileStatement<'gc>>
The payload if this is a WhileStatement, None otherwise.
Sourcepub fn as_do_while_statement(&self) -> Option<&DoWhileStatement<'gc>>
pub fn as_do_while_statement(&self) -> Option<&DoWhileStatement<'gc>>
The payload if this is a DoWhileStatement, None otherwise.
Sourcepub fn as_for_in_statement(&self) -> Option<&ForInStatement<'gc>>
pub fn as_for_in_statement(&self) -> Option<&ForInStatement<'gc>>
The payload if this is a ForInStatement, None otherwise.
Sourcepub fn as_for_of_statement(&self) -> Option<&ForOfStatement<'gc>>
pub fn as_for_of_statement(&self) -> Option<&ForOfStatement<'gc>>
The payload if this is a ForOfStatement, None otherwise.
Sourcepub fn as_for_statement(&self) -> Option<&ForStatement<'gc>>
pub fn as_for_statement(&self) -> Option<&ForStatement<'gc>>
The payload if this is a ForStatement, None otherwise.
Sourcepub fn as_debugger_statement(&self) -> Option<&DebuggerStatement<'gc>>
pub fn as_debugger_statement(&self) -> Option<&DebuggerStatement<'gc>>
The payload if this is a DebuggerStatement, None otherwise.
Sourcepub fn as_empty_statement(&self) -> Option<&EmptyStatement<'gc>>
pub fn as_empty_statement(&self) -> Option<&EmptyStatement<'gc>>
The payload if this is a EmptyStatement, None otherwise.
Sourcepub fn as_block_statement(&self) -> Option<&BlockStatement<'gc>>
pub fn as_block_statement(&self) -> Option<&BlockStatement<'gc>>
The payload if this is a BlockStatement, None otherwise.
Sourcepub fn as_static_block(&self) -> Option<&StaticBlock<'gc>>
pub fn as_static_block(&self) -> Option<&StaticBlock<'gc>>
The payload if this is a StaticBlock, None otherwise.
Sourcepub fn as_break_statement(&self) -> Option<&BreakStatement<'gc>>
pub fn as_break_statement(&self) -> Option<&BreakStatement<'gc>>
The payload if this is a BreakStatement, None otherwise.
Sourcepub fn as_continue_statement(&self) -> Option<&ContinueStatement<'gc>>
pub fn as_continue_statement(&self) -> Option<&ContinueStatement<'gc>>
The payload if this is a ContinueStatement, None otherwise.
Sourcepub fn as_throw_statement(&self) -> Option<&ThrowStatement<'gc>>
pub fn as_throw_statement(&self) -> Option<&ThrowStatement<'gc>>
The payload if this is a ThrowStatement, None otherwise.
Sourcepub fn as_return_statement(&self) -> Option<&ReturnStatement<'gc>>
pub fn as_return_statement(&self) -> Option<&ReturnStatement<'gc>>
The payload if this is a ReturnStatement, None otherwise.
Sourcepub fn as_with_statement(&self) -> Option<&WithStatement<'gc>>
pub fn as_with_statement(&self) -> Option<&WithStatement<'gc>>
The payload if this is a WithStatement, None otherwise.
Sourcepub fn as_switch_statement(&self) -> Option<&SwitchStatement<'gc>>
pub fn as_switch_statement(&self) -> Option<&SwitchStatement<'gc>>
The payload if this is a SwitchStatement, None otherwise.
Sourcepub fn as_labeled_statement(&self) -> Option<&LabeledStatement<'gc>>
pub fn as_labeled_statement(&self) -> Option<&LabeledStatement<'gc>>
The payload if this is a LabeledStatement, None otherwise.
Sourcepub fn as_expression_statement(&self) -> Option<&ExpressionStatement<'gc>>
pub fn as_expression_statement(&self) -> Option<&ExpressionStatement<'gc>>
The payload if this is a ExpressionStatement, None otherwise.
Sourcepub fn as_try_statement(&self) -> Option<&TryStatement<'gc>>
pub fn as_try_statement(&self) -> Option<&TryStatement<'gc>>
The payload if this is a TryStatement, None otherwise.
Sourcepub fn as_if_statement(&self) -> Option<&IfStatement<'gc>>
pub fn as_if_statement(&self) -> Option<&IfStatement<'gc>>
The payload if this is a IfStatement, None otherwise.
Sourcepub fn as_null_literal(&self) -> Option<&NullLiteral<'gc>>
pub fn as_null_literal(&self) -> Option<&NullLiteral<'gc>>
The payload if this is a NullLiteral, None otherwise.
Sourcepub fn as_boolean_literal(&self) -> Option<&BooleanLiteral<'gc>>
pub fn as_boolean_literal(&self) -> Option<&BooleanLiteral<'gc>>
The payload if this is a BooleanLiteral, None otherwise.
Sourcepub fn as_string_literal(&self) -> Option<&StringLiteral<'gc>>
pub fn as_string_literal(&self) -> Option<&StringLiteral<'gc>>
The payload if this is a StringLiteral, None otherwise.
Sourcepub fn as_numeric_literal(&self) -> Option<&NumericLiteral<'gc>>
pub fn as_numeric_literal(&self) -> Option<&NumericLiteral<'gc>>
The payload if this is a NumericLiteral, None otherwise.
Sourcepub fn as_reg_exp_literal(&self) -> Option<&RegExpLiteral<'gc>>
pub fn as_reg_exp_literal(&self) -> Option<&RegExpLiteral<'gc>>
The payload if this is a RegExpLiteral, None otherwise.
Sourcepub fn as_big_int_literal(&self) -> Option<&BigIntLiteral<'gc>>
pub fn as_big_int_literal(&self) -> Option<&BigIntLiteral<'gc>>
The payload if this is a BigIntLiteral, None otherwise.
Sourcepub fn as_this_expression(&self) -> Option<&ThisExpression<'gc>>
pub fn as_this_expression(&self) -> Option<&ThisExpression<'gc>>
The payload if this is a ThisExpression, None otherwise.
Sourcepub fn as_sequence_expression(&self) -> Option<&SequenceExpression<'gc>>
pub fn as_sequence_expression(&self) -> Option<&SequenceExpression<'gc>>
The payload if this is a SequenceExpression, None otherwise.
Sourcepub fn as_object_expression(&self) -> Option<&ObjectExpression<'gc>>
pub fn as_object_expression(&self) -> Option<&ObjectExpression<'gc>>
The payload if this is a ObjectExpression, None otherwise.
Sourcepub fn as_array_expression(&self) -> Option<&ArrayExpression<'gc>>
pub fn as_array_expression(&self) -> Option<&ArrayExpression<'gc>>
The payload if this is a ArrayExpression, None otherwise.
Sourcepub fn as_spread_element(&self) -> Option<&SpreadElement<'gc>>
pub fn as_spread_element(&self) -> Option<&SpreadElement<'gc>>
The payload if this is a SpreadElement, None otherwise.
Sourcepub fn as_new_expression(&self) -> Option<&NewExpression<'gc>>
pub fn as_new_expression(&self) -> Option<&NewExpression<'gc>>
The payload if this is a NewExpression, None otherwise.
Sourcepub fn as_yield_expression(&self) -> Option<&YieldExpression<'gc>>
pub fn as_yield_expression(&self) -> Option<&YieldExpression<'gc>>
The payload if this is a YieldExpression, None otherwise.
Sourcepub fn as_await_expression(&self) -> Option<&AwaitExpression<'gc>>
pub fn as_await_expression(&self) -> Option<&AwaitExpression<'gc>>
The payload if this is a AwaitExpression, None otherwise.
Sourcepub fn as_import_expression(&self) -> Option<&ImportExpression<'gc>>
pub fn as_import_expression(&self) -> Option<&ImportExpression<'gc>>
The payload if this is a ImportExpression, None otherwise.
Sourcepub fn as_call_expression(&self) -> Option<&CallExpression<'gc>>
pub fn as_call_expression(&self) -> Option<&CallExpression<'gc>>
The payload if this is a CallExpression, None otherwise.
Sourcepub fn as_optional_call_expression(
&self,
) -> Option<&OptionalCallExpression<'gc>>
pub fn as_optional_call_expression( &self, ) -> Option<&OptionalCallExpression<'gc>>
The payload if this is a OptionalCallExpression, None otherwise.
Sourcepub fn as_assignment_expression(&self) -> Option<&AssignmentExpression<'gc>>
pub fn as_assignment_expression(&self) -> Option<&AssignmentExpression<'gc>>
The payload if this is a AssignmentExpression, None otherwise.
Sourcepub fn as_unary_expression(&self) -> Option<&UnaryExpression<'gc>>
pub fn as_unary_expression(&self) -> Option<&UnaryExpression<'gc>>
The payload if this is a UnaryExpression, None otherwise.
Sourcepub fn as_update_expression(&self) -> Option<&UpdateExpression<'gc>>
pub fn as_update_expression(&self) -> Option<&UpdateExpression<'gc>>
The payload if this is a UpdateExpression, None otherwise.
Sourcepub fn as_member_expression(&self) -> Option<&MemberExpression<'gc>>
pub fn as_member_expression(&self) -> Option<&MemberExpression<'gc>>
The payload if this is a MemberExpression, None otherwise.
Sourcepub fn as_optional_member_expression(
&self,
) -> Option<&OptionalMemberExpression<'gc>>
pub fn as_optional_member_expression( &self, ) -> Option<&OptionalMemberExpression<'gc>>
The payload if this is a OptionalMemberExpression, None otherwise.
Sourcepub fn as_logical_expression(&self) -> Option<&LogicalExpression<'gc>>
pub fn as_logical_expression(&self) -> Option<&LogicalExpression<'gc>>
The payload if this is a LogicalExpression, None otherwise.
Sourcepub fn as_conditional_expression(&self) -> Option<&ConditionalExpression<'gc>>
pub fn as_conditional_expression(&self) -> Option<&ConditionalExpression<'gc>>
The payload if this is a ConditionalExpression, None otherwise.
Sourcepub fn as_binary_expression(&self) -> Option<&BinaryExpression<'gc>>
pub fn as_binary_expression(&self) -> Option<&BinaryExpression<'gc>>
The payload if this is a BinaryExpression, None otherwise.
Sourcepub fn as_directive(&self) -> Option<&Directive<'gc>>
pub fn as_directive(&self) -> Option<&Directive<'gc>>
The payload if this is a Directive, None otherwise.
Sourcepub fn as_directive_literal(&self) -> Option<&DirectiveLiteral<'gc>>
pub fn as_directive_literal(&self) -> Option<&DirectiveLiteral<'gc>>
The payload if this is a DirectiveLiteral, None otherwise.
Sourcepub fn as_identifier(&self) -> Option<&Identifier<'gc>>
pub fn as_identifier(&self) -> Option<&Identifier<'gc>>
The payload if this is a Identifier, None otherwise.
Sourcepub fn as_private_name(&self) -> Option<&PrivateName<'gc>>
pub fn as_private_name(&self) -> Option<&PrivateName<'gc>>
The payload if this is a PrivateName, None otherwise.
Sourcepub fn as_meta_property(&self) -> Option<&MetaProperty<'gc>>
pub fn as_meta_property(&self) -> Option<&MetaProperty<'gc>>
The payload if this is a MetaProperty, None otherwise.
Sourcepub fn as_switch_case(&self) -> Option<&SwitchCase<'gc>>
pub fn as_switch_case(&self) -> Option<&SwitchCase<'gc>>
The payload if this is a SwitchCase, None otherwise.
Sourcepub fn as_catch_clause(&self) -> Option<&CatchClause<'gc>>
pub fn as_catch_clause(&self) -> Option<&CatchClause<'gc>>
The payload if this is a CatchClause, None otherwise.
Sourcepub fn as_variable_declarator(&self) -> Option<&VariableDeclarator<'gc>>
pub fn as_variable_declarator(&self) -> Option<&VariableDeclarator<'gc>>
The payload if this is a VariableDeclarator, None otherwise.
Sourcepub fn as_variable_declaration(&self) -> Option<&VariableDeclaration<'gc>>
pub fn as_variable_declaration(&self) -> Option<&VariableDeclaration<'gc>>
The payload if this is a VariableDeclaration, None otherwise.
Sourcepub fn as_template_literal(&self) -> Option<&TemplateLiteral<'gc>>
pub fn as_template_literal(&self) -> Option<&TemplateLiteral<'gc>>
The payload if this is a TemplateLiteral, None otherwise.
Sourcepub fn as_tagged_template_expression(
&self,
) -> Option<&TaggedTemplateExpression<'gc>>
pub fn as_tagged_template_expression( &self, ) -> Option<&TaggedTemplateExpression<'gc>>
The payload if this is a TaggedTemplateExpression, None otherwise.
Sourcepub fn as_template_element(&self) -> Option<&TemplateElement<'gc>>
pub fn as_template_element(&self) -> Option<&TemplateElement<'gc>>
The payload if this is a TemplateElement, None otherwise.
Sourcepub fn as_property(&self) -> Option<&Property<'gc>>
pub fn as_property(&self) -> Option<&Property<'gc>>
The payload if this is a Property, None otherwise.
Sourcepub fn as_decorator(&self) -> Option<&Decorator<'gc>>
pub fn as_decorator(&self) -> Option<&Decorator<'gc>>
The payload if this is a Decorator, None otherwise.
Sourcepub fn as_class_declaration(&self) -> Option<&ClassDeclaration<'gc>>
pub fn as_class_declaration(&self) -> Option<&ClassDeclaration<'gc>>
The payload if this is a ClassDeclaration, None otherwise.
Sourcepub fn as_class_expression(&self) -> Option<&ClassExpression<'gc>>
pub fn as_class_expression(&self) -> Option<&ClassExpression<'gc>>
The payload if this is a ClassExpression, None otherwise.
Sourcepub fn as_class_body(&self) -> Option<&ClassBody<'gc>>
pub fn as_class_body(&self) -> Option<&ClassBody<'gc>>
The payload if this is a ClassBody, None otherwise.
Sourcepub fn as_class_property(&self) -> Option<&ClassProperty<'gc>>
pub fn as_class_property(&self) -> Option<&ClassProperty<'gc>>
The payload if this is a ClassProperty, None otherwise.
Sourcepub fn as_class_private_property(&self) -> Option<&ClassPrivateProperty<'gc>>
pub fn as_class_private_property(&self) -> Option<&ClassPrivateProperty<'gc>>
The payload if this is a ClassPrivateProperty, None otherwise.
Sourcepub fn as_method_definition(&self) -> Option<&MethodDefinition<'gc>>
pub fn as_method_definition(&self) -> Option<&MethodDefinition<'gc>>
The payload if this is a MethodDefinition, None otherwise.
Sourcepub fn as_import_declaration(&self) -> Option<&ImportDeclaration<'gc>>
pub fn as_import_declaration(&self) -> Option<&ImportDeclaration<'gc>>
The payload if this is a ImportDeclaration, None otherwise.
Sourcepub fn as_import_specifier(&self) -> Option<&ImportSpecifier<'gc>>
pub fn as_import_specifier(&self) -> Option<&ImportSpecifier<'gc>>
The payload if this is a ImportSpecifier, None otherwise.
Sourcepub fn as_import_default_specifier(
&self,
) -> Option<&ImportDefaultSpecifier<'gc>>
pub fn as_import_default_specifier( &self, ) -> Option<&ImportDefaultSpecifier<'gc>>
The payload if this is a ImportDefaultSpecifier, None otherwise.
Sourcepub fn as_import_namespace_specifier(
&self,
) -> Option<&ImportNamespaceSpecifier<'gc>>
pub fn as_import_namespace_specifier( &self, ) -> Option<&ImportNamespaceSpecifier<'gc>>
The payload if this is a ImportNamespaceSpecifier, None otherwise.
Sourcepub fn as_import_attribute(&self) -> Option<&ImportAttribute<'gc>>
pub fn as_import_attribute(&self) -> Option<&ImportAttribute<'gc>>
The payload if this is a ImportAttribute, None otherwise.
Sourcepub fn as_export_named_declaration(
&self,
) -> Option<&ExportNamedDeclaration<'gc>>
pub fn as_export_named_declaration( &self, ) -> Option<&ExportNamedDeclaration<'gc>>
The payload if this is a ExportNamedDeclaration, None otherwise.
Sourcepub fn as_export_specifier(&self) -> Option<&ExportSpecifier<'gc>>
pub fn as_export_specifier(&self) -> Option<&ExportSpecifier<'gc>>
The payload if this is a ExportSpecifier, None otherwise.
Sourcepub fn as_export_namespace_specifier(
&self,
) -> Option<&ExportNamespaceSpecifier<'gc>>
pub fn as_export_namespace_specifier( &self, ) -> Option<&ExportNamespaceSpecifier<'gc>>
The payload if this is a ExportNamespaceSpecifier, None otherwise.
Sourcepub fn as_export_default_declaration(
&self,
) -> Option<&ExportDefaultDeclaration<'gc>>
pub fn as_export_default_declaration( &self, ) -> Option<&ExportDefaultDeclaration<'gc>>
The payload if this is a ExportDefaultDeclaration, None otherwise.
Sourcepub fn as_export_all_declaration(&self) -> Option<&ExportAllDeclaration<'gc>>
pub fn as_export_all_declaration(&self) -> Option<&ExportAllDeclaration<'gc>>
The payload if this is a ExportAllDeclaration, None otherwise.
Sourcepub fn as_object_pattern(&self) -> Option<&ObjectPattern<'gc>>
pub fn as_object_pattern(&self) -> Option<&ObjectPattern<'gc>>
The payload if this is a ObjectPattern, None otherwise.
Sourcepub fn as_array_pattern(&self) -> Option<&ArrayPattern<'gc>>
pub fn as_array_pattern(&self) -> Option<&ArrayPattern<'gc>>
The payload if this is a ArrayPattern, None otherwise.
Sourcepub fn as_rest_element(&self) -> Option<&RestElement<'gc>>
pub fn as_rest_element(&self) -> Option<&RestElement<'gc>>
The payload if this is a RestElement, None otherwise.
Sourcepub fn as_assignment_pattern(&self) -> Option<&AssignmentPattern<'gc>>
pub fn as_assignment_pattern(&self) -> Option<&AssignmentPattern<'gc>>
The payload if this is a AssignmentPattern, None otherwise.
Sourcepub fn as_match_statement_case(&self) -> Option<&MatchStatementCase<'gc>>
pub fn as_match_statement_case(&self) -> Option<&MatchStatementCase<'gc>>
The payload if this is a MatchStatementCase, None otherwise.
Sourcepub fn as_match_expression(&self) -> Option<&MatchExpression<'gc>>
pub fn as_match_expression(&self) -> Option<&MatchExpression<'gc>>
The payload if this is a MatchExpression, None otherwise.
Sourcepub fn as_match_expression_case(&self) -> Option<&MatchExpressionCase<'gc>>
pub fn as_match_expression_case(&self) -> Option<&MatchExpressionCase<'gc>>
The payload if this is a MatchExpressionCase, None otherwise.
Sourcepub fn as_match_wildcard_pattern(&self) -> Option<&MatchWildcardPattern<'gc>>
pub fn as_match_wildcard_pattern(&self) -> Option<&MatchWildcardPattern<'gc>>
The payload if this is a MatchWildcardPattern, None otherwise.
Sourcepub fn as_match_literal_pattern(&self) -> Option<&MatchLiteralPattern<'gc>>
pub fn as_match_literal_pattern(&self) -> Option<&MatchLiteralPattern<'gc>>
The payload if this is a MatchLiteralPattern, None otherwise.
Sourcepub fn as_match_unary_pattern(&self) -> Option<&MatchUnaryPattern<'gc>>
pub fn as_match_unary_pattern(&self) -> Option<&MatchUnaryPattern<'gc>>
The payload if this is a MatchUnaryPattern, None otherwise.
Sourcepub fn as_match_identifier_pattern(
&self,
) -> Option<&MatchIdentifierPattern<'gc>>
pub fn as_match_identifier_pattern( &self, ) -> Option<&MatchIdentifierPattern<'gc>>
The payload if this is a MatchIdentifierPattern, None otherwise.
Sourcepub fn as_match_binding_pattern(&self) -> Option<&MatchBindingPattern<'gc>>
pub fn as_match_binding_pattern(&self) -> Option<&MatchBindingPattern<'gc>>
The payload if this is a MatchBindingPattern, None otherwise.
Sourcepub fn as_match_object_pattern(&self) -> Option<&MatchObjectPattern<'gc>>
pub fn as_match_object_pattern(&self) -> Option<&MatchObjectPattern<'gc>>
The payload if this is a MatchObjectPattern, None otherwise.
Sourcepub fn as_match_array_pattern(&self) -> Option<&MatchArrayPattern<'gc>>
pub fn as_match_array_pattern(&self) -> Option<&MatchArrayPattern<'gc>>
The payload if this is a MatchArrayPattern, None otherwise.
Sourcepub fn as_match_or_pattern(&self) -> Option<&MatchOrPattern<'gc>>
pub fn as_match_or_pattern(&self) -> Option<&MatchOrPattern<'gc>>
The payload if this is a MatchOrPattern, None otherwise.
Sourcepub fn as_match_as_pattern(&self) -> Option<&MatchAsPattern<'gc>>
pub fn as_match_as_pattern(&self) -> Option<&MatchAsPattern<'gc>>
The payload if this is a MatchAsPattern, None otherwise.
Sourcepub fn as_match_member_pattern(&self) -> Option<&MatchMemberPattern<'gc>>
pub fn as_match_member_pattern(&self) -> Option<&MatchMemberPattern<'gc>>
The payload if this is a MatchMemberPattern, None otherwise.
Sourcepub fn as_match_instance_pattern(&self) -> Option<&MatchInstancePattern<'gc>>
pub fn as_match_instance_pattern(&self) -> Option<&MatchInstancePattern<'gc>>
The payload if this is a MatchInstancePattern, None otherwise.
Sourcepub fn as_match_object_pattern_property(
&self,
) -> Option<&MatchObjectPatternProperty<'gc>>
pub fn as_match_object_pattern_property( &self, ) -> Option<&MatchObjectPatternProperty<'gc>>
The payload if this is a MatchObjectPatternProperty, None
otherwise.
Sourcepub fn as_match_instance_object_pattern(
&self,
) -> Option<&MatchInstanceObjectPattern<'gc>>
pub fn as_match_instance_object_pattern( &self, ) -> Option<&MatchInstanceObjectPattern<'gc>>
The payload if this is a MatchInstanceObjectPattern, None
otherwise.
Sourcepub fn as_match_rest_pattern(&self) -> Option<&MatchRestPattern<'gc>>
pub fn as_match_rest_pattern(&self) -> Option<&MatchRestPattern<'gc>>
The payload if this is a MatchRestPattern, None otherwise.
Sourcepub fn as_jsx_identifier(&self) -> Option<&JSXIdentifier<'gc>>
pub fn as_jsx_identifier(&self) -> Option<&JSXIdentifier<'gc>>
The payload if this is a JSXIdentifier, None otherwise.
Sourcepub fn as_jsx_member_expression(&self) -> Option<&JSXMemberExpression<'gc>>
pub fn as_jsx_member_expression(&self) -> Option<&JSXMemberExpression<'gc>>
The payload if this is a JSXMemberExpression, None otherwise.
Sourcepub fn as_jsx_namespaced_name(&self) -> Option<&JSXNamespacedName<'gc>>
pub fn as_jsx_namespaced_name(&self) -> Option<&JSXNamespacedName<'gc>>
The payload if this is a JSXNamespacedName, None otherwise.
Sourcepub fn as_jsx_empty_expression(&self) -> Option<&JSXEmptyExpression<'gc>>
pub fn as_jsx_empty_expression(&self) -> Option<&JSXEmptyExpression<'gc>>
The payload if this is a JSXEmptyExpression, None otherwise.
Sourcepub fn as_jsx_expression_container(
&self,
) -> Option<&JSXExpressionContainer<'gc>>
pub fn as_jsx_expression_container( &self, ) -> Option<&JSXExpressionContainer<'gc>>
The payload if this is a JSXExpressionContainer, None otherwise.
Sourcepub fn as_jsx_spread_child(&self) -> Option<&JSXSpreadChild<'gc>>
pub fn as_jsx_spread_child(&self) -> Option<&JSXSpreadChild<'gc>>
The payload if this is a JSXSpreadChild, None otherwise.
Sourcepub fn as_jsx_opening_element(&self) -> Option<&JSXOpeningElement<'gc>>
pub fn as_jsx_opening_element(&self) -> Option<&JSXOpeningElement<'gc>>
The payload if this is a JSXOpeningElement, None otherwise.
Sourcepub fn as_jsx_closing_element(&self) -> Option<&JSXClosingElement<'gc>>
pub fn as_jsx_closing_element(&self) -> Option<&JSXClosingElement<'gc>>
The payload if this is a JSXClosingElement, None otherwise.
Sourcepub fn as_jsx_attribute(&self) -> Option<&JSXAttribute<'gc>>
pub fn as_jsx_attribute(&self) -> Option<&JSXAttribute<'gc>>
The payload if this is a JSXAttribute, None otherwise.
Sourcepub fn as_jsx_spread_attribute(&self) -> Option<&JSXSpreadAttribute<'gc>>
pub fn as_jsx_spread_attribute(&self) -> Option<&JSXSpreadAttribute<'gc>>
The payload if this is a JSXSpreadAttribute, None otherwise.
Sourcepub fn as_jsx_string_literal(&self) -> Option<&JSXStringLiteral<'gc>>
pub fn as_jsx_string_literal(&self) -> Option<&JSXStringLiteral<'gc>>
The payload if this is a JSXStringLiteral, None otherwise.
Sourcepub fn as_jsx_text(&self) -> Option<&JSXText<'gc>>
pub fn as_jsx_text(&self) -> Option<&JSXText<'gc>>
The payload if this is a JSXText, None otherwise.
Sourcepub fn as_jsx_element(&self) -> Option<&JSXElement<'gc>>
pub fn as_jsx_element(&self) -> Option<&JSXElement<'gc>>
The payload if this is a JSXElement, None otherwise.
Sourcepub fn as_jsx_fragment(&self) -> Option<&JSXFragment<'gc>>
pub fn as_jsx_fragment(&self) -> Option<&JSXFragment<'gc>>
The payload if this is a JSXFragment, None otherwise.
Sourcepub fn as_jsx_opening_fragment(&self) -> Option<&JSXOpeningFragment<'gc>>
pub fn as_jsx_opening_fragment(&self) -> Option<&JSXOpeningFragment<'gc>>
The payload if this is a JSXOpeningFragment, None otherwise.
Sourcepub fn as_jsx_closing_fragment(&self) -> Option<&JSXClosingFragment<'gc>>
pub fn as_jsx_closing_fragment(&self) -> Option<&JSXClosingFragment<'gc>>
The payload if this is a JSXClosingFragment, None otherwise.
Sourcepub fn as_exists_type_annotation(&self) -> Option<&ExistsTypeAnnotation<'gc>>
pub fn as_exists_type_annotation(&self) -> Option<&ExistsTypeAnnotation<'gc>>
The payload if this is a ExistsTypeAnnotation, None otherwise.
Sourcepub fn as_empty_type_annotation(&self) -> Option<&EmptyTypeAnnotation<'gc>>
pub fn as_empty_type_annotation(&self) -> Option<&EmptyTypeAnnotation<'gc>>
The payload if this is a EmptyTypeAnnotation, None otherwise.
Sourcepub fn as_string_type_annotation(&self) -> Option<&StringTypeAnnotation<'gc>>
pub fn as_string_type_annotation(&self) -> Option<&StringTypeAnnotation<'gc>>
The payload if this is a StringTypeAnnotation, None otherwise.
Sourcepub fn as_number_type_annotation(&self) -> Option<&NumberTypeAnnotation<'gc>>
pub fn as_number_type_annotation(&self) -> Option<&NumberTypeAnnotation<'gc>>
The payload if this is a NumberTypeAnnotation, None otherwise.
Sourcepub fn as_string_literal_type_annotation(
&self,
) -> Option<&StringLiteralTypeAnnotation<'gc>>
pub fn as_string_literal_type_annotation( &self, ) -> Option<&StringLiteralTypeAnnotation<'gc>>
The payload if this is a StringLiteralTypeAnnotation, None
otherwise.
Sourcepub fn as_number_literal_type_annotation(
&self,
) -> Option<&NumberLiteralTypeAnnotation<'gc>>
pub fn as_number_literal_type_annotation( &self, ) -> Option<&NumberLiteralTypeAnnotation<'gc>>
The payload if this is a NumberLiteralTypeAnnotation, None
otherwise.
Sourcepub fn as_big_int_literal_type_annotation(
&self,
) -> Option<&BigIntLiteralTypeAnnotation<'gc>>
pub fn as_big_int_literal_type_annotation( &self, ) -> Option<&BigIntLiteralTypeAnnotation<'gc>>
The payload if this is a BigIntLiteralTypeAnnotation, None
otherwise.
Sourcepub fn as_boolean_type_annotation(&self) -> Option<&BooleanTypeAnnotation<'gc>>
pub fn as_boolean_type_annotation(&self) -> Option<&BooleanTypeAnnotation<'gc>>
The payload if this is a BooleanTypeAnnotation, None otherwise.
Sourcepub fn as_boolean_literal_type_annotation(
&self,
) -> Option<&BooleanLiteralTypeAnnotation<'gc>>
pub fn as_boolean_literal_type_annotation( &self, ) -> Option<&BooleanLiteralTypeAnnotation<'gc>>
The payload if this is a BooleanLiteralTypeAnnotation, None
otherwise.
Sourcepub fn as_null_literal_type_annotation(
&self,
) -> Option<&NullLiteralTypeAnnotation<'gc>>
pub fn as_null_literal_type_annotation( &self, ) -> Option<&NullLiteralTypeAnnotation<'gc>>
The payload if this is a NullLiteralTypeAnnotation, None
otherwise.
Sourcepub fn as_symbol_type_annotation(&self) -> Option<&SymbolTypeAnnotation<'gc>>
pub fn as_symbol_type_annotation(&self) -> Option<&SymbolTypeAnnotation<'gc>>
The payload if this is a SymbolTypeAnnotation, None otherwise.
Sourcepub fn as_any_type_annotation(&self) -> Option<&AnyTypeAnnotation<'gc>>
pub fn as_any_type_annotation(&self) -> Option<&AnyTypeAnnotation<'gc>>
The payload if this is a AnyTypeAnnotation, None otherwise.
Sourcepub fn as_mixed_type_annotation(&self) -> Option<&MixedTypeAnnotation<'gc>>
pub fn as_mixed_type_annotation(&self) -> Option<&MixedTypeAnnotation<'gc>>
The payload if this is a MixedTypeAnnotation, None otherwise.
Sourcepub fn as_big_int_type_annotation(&self) -> Option<&BigIntTypeAnnotation<'gc>>
pub fn as_big_int_type_annotation(&self) -> Option<&BigIntTypeAnnotation<'gc>>
The payload if this is a BigIntTypeAnnotation, None otherwise.
Sourcepub fn as_void_type_annotation(&self) -> Option<&VoidTypeAnnotation<'gc>>
pub fn as_void_type_annotation(&self) -> Option<&VoidTypeAnnotation<'gc>>
The payload if this is a VoidTypeAnnotation, None otherwise.
Sourcepub fn as_never_type_annotation(&self) -> Option<&NeverTypeAnnotation<'gc>>
pub fn as_never_type_annotation(&self) -> Option<&NeverTypeAnnotation<'gc>>
The payload if this is a NeverTypeAnnotation, None otherwise.
Sourcepub fn as_unknown_type_annotation(&self) -> Option<&UnknownTypeAnnotation<'gc>>
pub fn as_unknown_type_annotation(&self) -> Option<&UnknownTypeAnnotation<'gc>>
The payload if this is a UnknownTypeAnnotation, None otherwise.
Sourcepub fn as_undefined_type_annotation(
&self,
) -> Option<&UndefinedTypeAnnotation<'gc>>
pub fn as_undefined_type_annotation( &self, ) -> Option<&UndefinedTypeAnnotation<'gc>>
The payload if this is a UndefinedTypeAnnotation, None otherwise.
Sourcepub fn as_function_type_annotation(
&self,
) -> Option<&FunctionTypeAnnotation<'gc>>
pub fn as_function_type_annotation( &self, ) -> Option<&FunctionTypeAnnotation<'gc>>
The payload if this is a FunctionTypeAnnotation, None otherwise.
Sourcepub fn as_hook_type_annotation(&self) -> Option<&HookTypeAnnotation<'gc>>
pub fn as_hook_type_annotation(&self) -> Option<&HookTypeAnnotation<'gc>>
The payload if this is a HookTypeAnnotation, None otherwise.
Sourcepub fn as_function_type_param(&self) -> Option<&FunctionTypeParam<'gc>>
pub fn as_function_type_param(&self) -> Option<&FunctionTypeParam<'gc>>
The payload if this is a FunctionTypeParam, None otherwise.
Sourcepub fn as_component_type_annotation(
&self,
) -> Option<&ComponentTypeAnnotation<'gc>>
pub fn as_component_type_annotation( &self, ) -> Option<&ComponentTypeAnnotation<'gc>>
The payload if this is a ComponentTypeAnnotation, None otherwise.
Sourcepub fn as_component_type_parameter(
&self,
) -> Option<&ComponentTypeParameter<'gc>>
pub fn as_component_type_parameter( &self, ) -> Option<&ComponentTypeParameter<'gc>>
The payload if this is a ComponentTypeParameter, None otherwise.
Sourcepub fn as_nullable_type_annotation(
&self,
) -> Option<&NullableTypeAnnotation<'gc>>
pub fn as_nullable_type_annotation( &self, ) -> Option<&NullableTypeAnnotation<'gc>>
The payload if this is a NullableTypeAnnotation, None otherwise.
Sourcepub fn as_qualified_type_identifier(
&self,
) -> Option<&QualifiedTypeIdentifier<'gc>>
pub fn as_qualified_type_identifier( &self, ) -> Option<&QualifiedTypeIdentifier<'gc>>
The payload if this is a QualifiedTypeIdentifier, None otherwise.
Sourcepub fn as_typeof_type_annotation(&self) -> Option<&TypeofTypeAnnotation<'gc>>
pub fn as_typeof_type_annotation(&self) -> Option<&TypeofTypeAnnotation<'gc>>
The payload if this is a TypeofTypeAnnotation, None otherwise.
Sourcepub fn as_keyof_type_annotation(&self) -> Option<&KeyofTypeAnnotation<'gc>>
pub fn as_keyof_type_annotation(&self) -> Option<&KeyofTypeAnnotation<'gc>>
The payload if this is a KeyofTypeAnnotation, None otherwise.
Sourcepub fn as_type_operator(&self) -> Option<&TypeOperator<'gc>>
pub fn as_type_operator(&self) -> Option<&TypeOperator<'gc>>
The payload if this is a TypeOperator, None otherwise.
Sourcepub fn as_qualified_typeof_identifier(
&self,
) -> Option<&QualifiedTypeofIdentifier<'gc>>
pub fn as_qualified_typeof_identifier( &self, ) -> Option<&QualifiedTypeofIdentifier<'gc>>
The payload if this is a QualifiedTypeofIdentifier, None
otherwise.
Sourcepub fn as_tuple_type_annotation(&self) -> Option<&TupleTypeAnnotation<'gc>>
pub fn as_tuple_type_annotation(&self) -> Option<&TupleTypeAnnotation<'gc>>
The payload if this is a TupleTypeAnnotation, None otherwise.
Sourcepub fn as_tuple_type_spread_element(
&self,
) -> Option<&TupleTypeSpreadElement<'gc>>
pub fn as_tuple_type_spread_element( &self, ) -> Option<&TupleTypeSpreadElement<'gc>>
The payload if this is a TupleTypeSpreadElement, None otherwise.
Sourcepub fn as_tuple_type_labeled_element(
&self,
) -> Option<&TupleTypeLabeledElement<'gc>>
pub fn as_tuple_type_labeled_element( &self, ) -> Option<&TupleTypeLabeledElement<'gc>>
The payload if this is a TupleTypeLabeledElement, None otherwise.
Sourcepub fn as_array_type_annotation(&self) -> Option<&ArrayTypeAnnotation<'gc>>
pub fn as_array_type_annotation(&self) -> Option<&ArrayTypeAnnotation<'gc>>
The payload if this is a ArrayTypeAnnotation, None otherwise.
Sourcepub fn as_infer_type_annotation(&self) -> Option<&InferTypeAnnotation<'gc>>
pub fn as_infer_type_annotation(&self) -> Option<&InferTypeAnnotation<'gc>>
The payload if this is a InferTypeAnnotation, None otherwise.
Sourcepub fn as_union_type_annotation(&self) -> Option<&UnionTypeAnnotation<'gc>>
pub fn as_union_type_annotation(&self) -> Option<&UnionTypeAnnotation<'gc>>
The payload if this is a UnionTypeAnnotation, None otherwise.
Sourcepub fn as_intersection_type_annotation(
&self,
) -> Option<&IntersectionTypeAnnotation<'gc>>
pub fn as_intersection_type_annotation( &self, ) -> Option<&IntersectionTypeAnnotation<'gc>>
The payload if this is a IntersectionTypeAnnotation, None
otherwise.
Sourcepub fn as_generic_type_annotation(&self) -> Option<&GenericTypeAnnotation<'gc>>
pub fn as_generic_type_annotation(&self) -> Option<&GenericTypeAnnotation<'gc>>
The payload if this is a GenericTypeAnnotation, None otherwise.
Sourcepub fn as_indexed_access_type(&self) -> Option<&IndexedAccessType<'gc>>
pub fn as_indexed_access_type(&self) -> Option<&IndexedAccessType<'gc>>
The payload if this is a IndexedAccessType, None otherwise.
Sourcepub fn as_optional_indexed_access_type(
&self,
) -> Option<&OptionalIndexedAccessType<'gc>>
pub fn as_optional_indexed_access_type( &self, ) -> Option<&OptionalIndexedAccessType<'gc>>
The payload if this is a OptionalIndexedAccessType, None
otherwise.
Sourcepub fn as_conditional_type_annotation(
&self,
) -> Option<&ConditionalTypeAnnotation<'gc>>
pub fn as_conditional_type_annotation( &self, ) -> Option<&ConditionalTypeAnnotation<'gc>>
The payload if this is a ConditionalTypeAnnotation, None
otherwise.
Sourcepub fn as_type_predicate(&self) -> Option<&TypePredicate<'gc>>
pub fn as_type_predicate(&self) -> Option<&TypePredicate<'gc>>
The payload if this is a TypePredicate, None otherwise.
Sourcepub fn as_interface_type_annotation(
&self,
) -> Option<&InterfaceTypeAnnotation<'gc>>
pub fn as_interface_type_annotation( &self, ) -> Option<&InterfaceTypeAnnotation<'gc>>
The payload if this is a InterfaceTypeAnnotation, None otherwise.
Sourcepub fn as_type_alias(&self) -> Option<&TypeAlias<'gc>>
pub fn as_type_alias(&self) -> Option<&TypeAlias<'gc>>
The payload if this is a TypeAlias, None otherwise.
Sourcepub fn as_opaque_type(&self) -> Option<&OpaqueType<'gc>>
pub fn as_opaque_type(&self) -> Option<&OpaqueType<'gc>>
The payload if this is a OpaqueType, None otherwise.
Sourcepub fn as_interface_declaration(&self) -> Option<&InterfaceDeclaration<'gc>>
pub fn as_interface_declaration(&self) -> Option<&InterfaceDeclaration<'gc>>
The payload if this is a InterfaceDeclaration, None otherwise.
Sourcepub fn as_declare_type_alias(&self) -> Option<&DeclareTypeAlias<'gc>>
pub fn as_declare_type_alias(&self) -> Option<&DeclareTypeAlias<'gc>>
The payload if this is a DeclareTypeAlias, None otherwise.
Sourcepub fn as_declare_opaque_type(&self) -> Option<&DeclareOpaqueType<'gc>>
pub fn as_declare_opaque_type(&self) -> Option<&DeclareOpaqueType<'gc>>
The payload if this is a DeclareOpaqueType, None otherwise.
Sourcepub fn as_declare_interface(&self) -> Option<&DeclareInterface<'gc>>
pub fn as_declare_interface(&self) -> Option<&DeclareInterface<'gc>>
The payload if this is a DeclareInterface, None otherwise.
Sourcepub fn as_declare_class(&self) -> Option<&DeclareClass<'gc>>
pub fn as_declare_class(&self) -> Option<&DeclareClass<'gc>>
The payload if this is a DeclareClass, None otherwise.
Sourcepub fn as_declare_function(&self) -> Option<&DeclareFunction<'gc>>
pub fn as_declare_function(&self) -> Option<&DeclareFunction<'gc>>
The payload if this is a DeclareFunction, None otherwise.
Sourcepub fn as_declare_hook(&self) -> Option<&DeclareHook<'gc>>
pub fn as_declare_hook(&self) -> Option<&DeclareHook<'gc>>
The payload if this is a DeclareHook, None otherwise.
Sourcepub fn as_declare_component(&self) -> Option<&DeclareComponent<'gc>>
pub fn as_declare_component(&self) -> Option<&DeclareComponent<'gc>>
The payload if this is a DeclareComponent, None otherwise.
Sourcepub fn as_declare_variable(&self) -> Option<&DeclareVariable<'gc>>
pub fn as_declare_variable(&self) -> Option<&DeclareVariable<'gc>>
The payload if this is a DeclareVariable, None otherwise.
Sourcepub fn as_declare_enum(&self) -> Option<&DeclareEnum<'gc>>
pub fn as_declare_enum(&self) -> Option<&DeclareEnum<'gc>>
The payload if this is a DeclareEnum, None otherwise.
Sourcepub fn as_declare_export_declaration(
&self,
) -> Option<&DeclareExportDeclaration<'gc>>
pub fn as_declare_export_declaration( &self, ) -> Option<&DeclareExportDeclaration<'gc>>
The payload if this is a DeclareExportDeclaration, None otherwise.
Sourcepub fn as_declare_export_all_declaration(
&self,
) -> Option<&DeclareExportAllDeclaration<'gc>>
pub fn as_declare_export_all_declaration( &self, ) -> Option<&DeclareExportAllDeclaration<'gc>>
The payload if this is a DeclareExportAllDeclaration, None
otherwise.
Sourcepub fn as_declare_module(&self) -> Option<&DeclareModule<'gc>>
pub fn as_declare_module(&self) -> Option<&DeclareModule<'gc>>
The payload if this is a DeclareModule, None otherwise.
Sourcepub fn as_declare_namespace(&self) -> Option<&DeclareNamespace<'gc>>
pub fn as_declare_namespace(&self) -> Option<&DeclareNamespace<'gc>>
The payload if this is a DeclareNamespace, None otherwise.
Sourcepub fn as_declare_module_exports(&self) -> Option<&DeclareModuleExports<'gc>>
pub fn as_declare_module_exports(&self) -> Option<&DeclareModuleExports<'gc>>
The payload if this is a DeclareModuleExports, None otherwise.
Sourcepub fn as_interface_extends(&self) -> Option<&InterfaceExtends<'gc>>
pub fn as_interface_extends(&self) -> Option<&InterfaceExtends<'gc>>
The payload if this is a InterfaceExtends, None otherwise.
Sourcepub fn as_class_implements(&self) -> Option<&ClassImplements<'gc>>
pub fn as_class_implements(&self) -> Option<&ClassImplements<'gc>>
The payload if this is a ClassImplements, None otherwise.
Sourcepub fn as_type_annotation(&self) -> Option<&TypeAnnotation<'gc>>
pub fn as_type_annotation(&self) -> Option<&TypeAnnotation<'gc>>
The payload if this is a TypeAnnotation, None otherwise.
Sourcepub fn as_object_type_annotation(&self) -> Option<&ObjectTypeAnnotation<'gc>>
pub fn as_object_type_annotation(&self) -> Option<&ObjectTypeAnnotation<'gc>>
The payload if this is a ObjectTypeAnnotation, None otherwise.
Sourcepub fn as_object_type_property(&self) -> Option<&ObjectTypeProperty<'gc>>
pub fn as_object_type_property(&self) -> Option<&ObjectTypeProperty<'gc>>
The payload if this is a ObjectTypeProperty, None otherwise.
Sourcepub fn as_object_type_spread_property(
&self,
) -> Option<&ObjectTypeSpreadProperty<'gc>>
pub fn as_object_type_spread_property( &self, ) -> Option<&ObjectTypeSpreadProperty<'gc>>
The payload if this is a ObjectTypeSpreadProperty, None otherwise.
Sourcepub fn as_object_type_internal_slot(
&self,
) -> Option<&ObjectTypeInternalSlot<'gc>>
pub fn as_object_type_internal_slot( &self, ) -> Option<&ObjectTypeInternalSlot<'gc>>
The payload if this is a ObjectTypeInternalSlot, None otherwise.
Sourcepub fn as_object_type_call_property(
&self,
) -> Option<&ObjectTypeCallProperty<'gc>>
pub fn as_object_type_call_property( &self, ) -> Option<&ObjectTypeCallProperty<'gc>>
The payload if this is a ObjectTypeCallProperty, None otherwise.
Sourcepub fn as_object_type_indexer(&self) -> Option<&ObjectTypeIndexer<'gc>>
pub fn as_object_type_indexer(&self) -> Option<&ObjectTypeIndexer<'gc>>
The payload if this is a ObjectTypeIndexer, None otherwise.
Sourcepub fn as_object_type_mapped_type_property(
&self,
) -> Option<&ObjectTypeMappedTypeProperty<'gc>>
pub fn as_object_type_mapped_type_property( &self, ) -> Option<&ObjectTypeMappedTypeProperty<'gc>>
The payload if this is a ObjectTypeMappedTypeProperty, None
otherwise.
Sourcepub fn as_variance(&self) -> Option<&Variance<'gc>>
pub fn as_variance(&self) -> Option<&Variance<'gc>>
The payload if this is a Variance, None otherwise.
Sourcepub fn as_type_parameter_declaration(
&self,
) -> Option<&TypeParameterDeclaration<'gc>>
pub fn as_type_parameter_declaration( &self, ) -> Option<&TypeParameterDeclaration<'gc>>
The payload if this is a TypeParameterDeclaration, None otherwise.
Sourcepub fn as_type_parameter(&self) -> Option<&TypeParameter<'gc>>
pub fn as_type_parameter(&self) -> Option<&TypeParameter<'gc>>
The payload if this is a TypeParameter, None otherwise.
Sourcepub fn as_type_parameter_instantiation(
&self,
) -> Option<&TypeParameterInstantiation<'gc>>
pub fn as_type_parameter_instantiation( &self, ) -> Option<&TypeParameterInstantiation<'gc>>
The payload if this is a TypeParameterInstantiation, None
otherwise.
Sourcepub fn as_type_cast_expression(&self) -> Option<&TypeCastExpression<'gc>>
pub fn as_type_cast_expression(&self) -> Option<&TypeCastExpression<'gc>>
The payload if this is a TypeCastExpression, None otherwise.
Sourcepub fn as_as_expression(&self) -> Option<&AsExpression<'gc>>
pub fn as_as_expression(&self) -> Option<&AsExpression<'gc>>
The payload if this is a AsExpression, None otherwise.
Sourcepub fn as_as_const_expression(&self) -> Option<&AsConstExpression<'gc>>
pub fn as_as_const_expression(&self) -> Option<&AsConstExpression<'gc>>
The payload if this is a AsConstExpression, None otherwise.
Sourcepub fn as_inferred_predicate(&self) -> Option<&InferredPredicate<'gc>>
pub fn as_inferred_predicate(&self) -> Option<&InferredPredicate<'gc>>
The payload if this is a InferredPredicate, None otherwise.
Sourcepub fn as_declared_predicate(&self) -> Option<&DeclaredPredicate<'gc>>
pub fn as_declared_predicate(&self) -> Option<&DeclaredPredicate<'gc>>
The payload if this is a DeclaredPredicate, None otherwise.
Sourcepub fn as_enum_declaration(&self) -> Option<&EnumDeclaration<'gc>>
pub fn as_enum_declaration(&self) -> Option<&EnumDeclaration<'gc>>
The payload if this is a EnumDeclaration, None otherwise.
Sourcepub fn as_enum_string_body(&self) -> Option<&EnumStringBody<'gc>>
pub fn as_enum_string_body(&self) -> Option<&EnumStringBody<'gc>>
The payload if this is a EnumStringBody, None otherwise.
Sourcepub fn as_enum_number_body(&self) -> Option<&EnumNumberBody<'gc>>
pub fn as_enum_number_body(&self) -> Option<&EnumNumberBody<'gc>>
The payload if this is a EnumNumberBody, None otherwise.
Sourcepub fn as_enum_big_int_body(&self) -> Option<&EnumBigIntBody<'gc>>
pub fn as_enum_big_int_body(&self) -> Option<&EnumBigIntBody<'gc>>
The payload if this is a EnumBigIntBody, None otherwise.
Sourcepub fn as_enum_boolean_body(&self) -> Option<&EnumBooleanBody<'gc>>
pub fn as_enum_boolean_body(&self) -> Option<&EnumBooleanBody<'gc>>
The payload if this is a EnumBooleanBody, None otherwise.
Sourcepub fn as_enum_symbol_body(&self) -> Option<&EnumSymbolBody<'gc>>
pub fn as_enum_symbol_body(&self) -> Option<&EnumSymbolBody<'gc>>
The payload if this is a EnumSymbolBody, None otherwise.
Sourcepub fn as_enum_defaulted_member(&self) -> Option<&EnumDefaultedMember<'gc>>
pub fn as_enum_defaulted_member(&self) -> Option<&EnumDefaultedMember<'gc>>
The payload if this is a EnumDefaultedMember, None otherwise.
Sourcepub fn as_enum_string_member(&self) -> Option<&EnumStringMember<'gc>>
pub fn as_enum_string_member(&self) -> Option<&EnumStringMember<'gc>>
The payload if this is a EnumStringMember, None otherwise.
Sourcepub fn as_enum_number_member(&self) -> Option<&EnumNumberMember<'gc>>
pub fn as_enum_number_member(&self) -> Option<&EnumNumberMember<'gc>>
The payload if this is a EnumNumberMember, None otherwise.
Sourcepub fn as_enum_big_int_member(&self) -> Option<&EnumBigIntMember<'gc>>
pub fn as_enum_big_int_member(&self) -> Option<&EnumBigIntMember<'gc>>
The payload if this is a EnumBigIntMember, None otherwise.
Sourcepub fn as_enum_boolean_member(&self) -> Option<&EnumBooleanMember<'gc>>
pub fn as_enum_boolean_member(&self) -> Option<&EnumBooleanMember<'gc>>
The payload if this is a EnumBooleanMember, None otherwise.
Sourcepub fn as_component_parameter(&self) -> Option<&ComponentParameter<'gc>>
pub fn as_component_parameter(&self) -> Option<&ComponentParameter<'gc>>
The payload if this is a ComponentParameter, None otherwise.
Sourcepub fn as_record_declaration(&self) -> Option<&RecordDeclaration<'gc>>
pub fn as_record_declaration(&self) -> Option<&RecordDeclaration<'gc>>
The payload if this is a RecordDeclaration, None otherwise.
Sourcepub fn as_record_declaration_implements(
&self,
) -> Option<&RecordDeclarationImplements<'gc>>
pub fn as_record_declaration_implements( &self, ) -> Option<&RecordDeclarationImplements<'gc>>
The payload if this is a RecordDeclarationImplements, None
otherwise.
Sourcepub fn as_record_declaration_body(&self) -> Option<&RecordDeclarationBody<'gc>>
pub fn as_record_declaration_body(&self) -> Option<&RecordDeclarationBody<'gc>>
The payload if this is a RecordDeclarationBody, None otherwise.
Sourcepub fn as_record_declaration_property(
&self,
) -> Option<&RecordDeclarationProperty<'gc>>
pub fn as_record_declaration_property( &self, ) -> Option<&RecordDeclarationProperty<'gc>>
The payload if this is a RecordDeclarationProperty, None
otherwise.
Sourcepub fn as_record_declaration_static_property(
&self,
) -> Option<&RecordDeclarationStaticProperty<'gc>>
pub fn as_record_declaration_static_property( &self, ) -> Option<&RecordDeclarationStaticProperty<'gc>>
The payload if this is a RecordDeclarationStaticProperty, None
otherwise.
Sourcepub fn as_record_expression(&self) -> Option<&RecordExpression<'gc>>
pub fn as_record_expression(&self) -> Option<&RecordExpression<'gc>>
The payload if this is a RecordExpression, None otherwise.
Sourcepub fn as_record_expression_properties(
&self,
) -> Option<&RecordExpressionProperties<'gc>>
pub fn as_record_expression_properties( &self, ) -> Option<&RecordExpressionProperties<'gc>>
The payload if this is a RecordExpressionProperties, None
otherwise.
Sourcepub fn as_ts_type_annotation(&self) -> Option<&TSTypeAnnotation<'gc>>
pub fn as_ts_type_annotation(&self) -> Option<&TSTypeAnnotation<'gc>>
The payload if this is a TSTypeAnnotation, None otherwise.
Sourcepub fn as_ts_any_keyword(&self) -> Option<&TSAnyKeyword<'gc>>
pub fn as_ts_any_keyword(&self) -> Option<&TSAnyKeyword<'gc>>
The payload if this is a TSAnyKeyword, None otherwise.
Sourcepub fn as_ts_number_keyword(&self) -> Option<&TSNumberKeyword<'gc>>
pub fn as_ts_number_keyword(&self) -> Option<&TSNumberKeyword<'gc>>
The payload if this is a TSNumberKeyword, None otherwise.
Sourcepub fn as_ts_boolean_keyword(&self) -> Option<&TSBooleanKeyword<'gc>>
pub fn as_ts_boolean_keyword(&self) -> Option<&TSBooleanKeyword<'gc>>
The payload if this is a TSBooleanKeyword, None otherwise.
Sourcepub fn as_ts_string_keyword(&self) -> Option<&TSStringKeyword<'gc>>
pub fn as_ts_string_keyword(&self) -> Option<&TSStringKeyword<'gc>>
The payload if this is a TSStringKeyword, None otherwise.
Sourcepub fn as_ts_symbol_keyword(&self) -> Option<&TSSymbolKeyword<'gc>>
pub fn as_ts_symbol_keyword(&self) -> Option<&TSSymbolKeyword<'gc>>
The payload if this is a TSSymbolKeyword, None otherwise.
Sourcepub fn as_ts_void_keyword(&self) -> Option<&TSVoidKeyword<'gc>>
pub fn as_ts_void_keyword(&self) -> Option<&TSVoidKeyword<'gc>>
The payload if this is a TSVoidKeyword, None otherwise.
Sourcepub fn as_ts_undefined_keyword(&self) -> Option<&TSUndefinedKeyword<'gc>>
pub fn as_ts_undefined_keyword(&self) -> Option<&TSUndefinedKeyword<'gc>>
The payload if this is a TSUndefinedKeyword, None otherwise.
Sourcepub fn as_ts_unknown_keyword(&self) -> Option<&TSUnknownKeyword<'gc>>
pub fn as_ts_unknown_keyword(&self) -> Option<&TSUnknownKeyword<'gc>>
The payload if this is a TSUnknownKeyword, None otherwise.
Sourcepub fn as_ts_never_keyword(&self) -> Option<&TSNeverKeyword<'gc>>
pub fn as_ts_never_keyword(&self) -> Option<&TSNeverKeyword<'gc>>
The payload if this is a TSNeverKeyword, None otherwise.
Sourcepub fn as_ts_big_int_keyword(&self) -> Option<&TSBigIntKeyword<'gc>>
pub fn as_ts_big_int_keyword(&self) -> Option<&TSBigIntKeyword<'gc>>
The payload if this is a TSBigIntKeyword, None otherwise.
Sourcepub fn as_ts_this_type(&self) -> Option<&TSThisType<'gc>>
pub fn as_ts_this_type(&self) -> Option<&TSThisType<'gc>>
The payload if this is a TSThisType, None otherwise.
Sourcepub fn as_ts_literal_type(&self) -> Option<&TSLiteralType<'gc>>
pub fn as_ts_literal_type(&self) -> Option<&TSLiteralType<'gc>>
The payload if this is a TSLiteralType, None otherwise.
Sourcepub fn as_ts_indexed_access_type(&self) -> Option<&TSIndexedAccessType<'gc>>
pub fn as_ts_indexed_access_type(&self) -> Option<&TSIndexedAccessType<'gc>>
The payload if this is a TSIndexedAccessType, None otherwise.
Sourcepub fn as_ts_array_type(&self) -> Option<&TSArrayType<'gc>>
pub fn as_ts_array_type(&self) -> Option<&TSArrayType<'gc>>
The payload if this is a TSArrayType, None otherwise.
Sourcepub fn as_ts_type_reference(&self) -> Option<&TSTypeReference<'gc>>
pub fn as_ts_type_reference(&self) -> Option<&TSTypeReference<'gc>>
The payload if this is a TSTypeReference, None otherwise.
Sourcepub fn as_ts_qualified_name(&self) -> Option<&TSQualifiedName<'gc>>
pub fn as_ts_qualified_name(&self) -> Option<&TSQualifiedName<'gc>>
The payload if this is a TSQualifiedName, None otherwise.
Sourcepub fn as_ts_function_type(&self) -> Option<&TSFunctionType<'gc>>
pub fn as_ts_function_type(&self) -> Option<&TSFunctionType<'gc>>
The payload if this is a TSFunctionType, None otherwise.
Sourcepub fn as_ts_constructor_type(&self) -> Option<&TSConstructorType<'gc>>
pub fn as_ts_constructor_type(&self) -> Option<&TSConstructorType<'gc>>
The payload if this is a TSConstructorType, None otherwise.
Sourcepub fn as_ts_type_predicate(&self) -> Option<&TSTypePredicate<'gc>>
pub fn as_ts_type_predicate(&self) -> Option<&TSTypePredicate<'gc>>
The payload if this is a TSTypePredicate, None otherwise.
Sourcepub fn as_ts_tuple_type(&self) -> Option<&TSTupleType<'gc>>
pub fn as_ts_tuple_type(&self) -> Option<&TSTupleType<'gc>>
The payload if this is a TSTupleType, None otherwise.
Sourcepub fn as_ts_type_assertion(&self) -> Option<&TSTypeAssertion<'gc>>
pub fn as_ts_type_assertion(&self) -> Option<&TSTypeAssertion<'gc>>
The payload if this is a TSTypeAssertion, None otherwise.
Sourcepub fn as_ts_as_expression(&self) -> Option<&TSAsExpression<'gc>>
pub fn as_ts_as_expression(&self) -> Option<&TSAsExpression<'gc>>
The payload if this is a TSAsExpression, None otherwise.
Sourcepub fn as_ts_parameter_property(&self) -> Option<&TSParameterProperty<'gc>>
pub fn as_ts_parameter_property(&self) -> Option<&TSParameterProperty<'gc>>
The payload if this is a TSParameterProperty, None otherwise.
Sourcepub fn as_ts_type_alias_declaration(
&self,
) -> Option<&TSTypeAliasDeclaration<'gc>>
pub fn as_ts_type_alias_declaration( &self, ) -> Option<&TSTypeAliasDeclaration<'gc>>
The payload if this is a TSTypeAliasDeclaration, None otherwise.
Sourcepub fn as_ts_interface_declaration(
&self,
) -> Option<&TSInterfaceDeclaration<'gc>>
pub fn as_ts_interface_declaration( &self, ) -> Option<&TSInterfaceDeclaration<'gc>>
The payload if this is a TSInterfaceDeclaration, None otherwise.
Sourcepub fn as_ts_interface_heritage(&self) -> Option<&TSInterfaceHeritage<'gc>>
pub fn as_ts_interface_heritage(&self) -> Option<&TSInterfaceHeritage<'gc>>
The payload if this is a TSInterfaceHeritage, None otherwise.
Sourcepub fn as_ts_interface_body(&self) -> Option<&TSInterfaceBody<'gc>>
pub fn as_ts_interface_body(&self) -> Option<&TSInterfaceBody<'gc>>
The payload if this is a TSInterfaceBody, None otherwise.
Sourcepub fn as_ts_enum_declaration(&self) -> Option<&TSEnumDeclaration<'gc>>
pub fn as_ts_enum_declaration(&self) -> Option<&TSEnumDeclaration<'gc>>
The payload if this is a TSEnumDeclaration, None otherwise.
Sourcepub fn as_ts_enum_member(&self) -> Option<&TSEnumMember<'gc>>
pub fn as_ts_enum_member(&self) -> Option<&TSEnumMember<'gc>>
The payload if this is a TSEnumMember, None otherwise.
Sourcepub fn as_ts_module_declaration(&self) -> Option<&TSModuleDeclaration<'gc>>
pub fn as_ts_module_declaration(&self) -> Option<&TSModuleDeclaration<'gc>>
The payload if this is a TSModuleDeclaration, None otherwise.
Sourcepub fn as_ts_module_block(&self) -> Option<&TSModuleBlock<'gc>>
pub fn as_ts_module_block(&self) -> Option<&TSModuleBlock<'gc>>
The payload if this is a TSModuleBlock, None otherwise.
Sourcepub fn as_ts_module_member(&self) -> Option<&TSModuleMember<'gc>>
pub fn as_ts_module_member(&self) -> Option<&TSModuleMember<'gc>>
The payload if this is a TSModuleMember, None otherwise.
Sourcepub fn as_ts_type_parameter_declaration(
&self,
) -> Option<&TSTypeParameterDeclaration<'gc>>
pub fn as_ts_type_parameter_declaration( &self, ) -> Option<&TSTypeParameterDeclaration<'gc>>
The payload if this is a TSTypeParameterDeclaration, None
otherwise.
Sourcepub fn as_ts_type_parameter(&self) -> Option<&TSTypeParameter<'gc>>
pub fn as_ts_type_parameter(&self) -> Option<&TSTypeParameter<'gc>>
The payload if this is a TSTypeParameter, None otherwise.
Sourcepub fn as_ts_type_parameter_instantiation(
&self,
) -> Option<&TSTypeParameterInstantiation<'gc>>
pub fn as_ts_type_parameter_instantiation( &self, ) -> Option<&TSTypeParameterInstantiation<'gc>>
The payload if this is a TSTypeParameterInstantiation, None
otherwise.
Sourcepub fn as_ts_union_type(&self) -> Option<&TSUnionType<'gc>>
pub fn as_ts_union_type(&self) -> Option<&TSUnionType<'gc>>
The payload if this is a TSUnionType, None otherwise.
Sourcepub fn as_ts_intersection_type(&self) -> Option<&TSIntersectionType<'gc>>
pub fn as_ts_intersection_type(&self) -> Option<&TSIntersectionType<'gc>>
The payload if this is a TSIntersectionType, None otherwise.
Sourcepub fn as_ts_type_query(&self) -> Option<&TSTypeQuery<'gc>>
pub fn as_ts_type_query(&self) -> Option<&TSTypeQuery<'gc>>
The payload if this is a TSTypeQuery, None otherwise.
Sourcepub fn as_ts_conditional_type(&self) -> Option<&TSConditionalType<'gc>>
pub fn as_ts_conditional_type(&self) -> Option<&TSConditionalType<'gc>>
The payload if this is a TSConditionalType, None otherwise.
Sourcepub fn as_ts_type_literal(&self) -> Option<&TSTypeLiteral<'gc>>
pub fn as_ts_type_literal(&self) -> Option<&TSTypeLiteral<'gc>>
The payload if this is a TSTypeLiteral, None otherwise.
Sourcepub fn as_ts_property_signature(&self) -> Option<&TSPropertySignature<'gc>>
pub fn as_ts_property_signature(&self) -> Option<&TSPropertySignature<'gc>>
The payload if this is a TSPropertySignature, None otherwise.
Sourcepub fn as_ts_method_signature(&self) -> Option<&TSMethodSignature<'gc>>
pub fn as_ts_method_signature(&self) -> Option<&TSMethodSignature<'gc>>
The payload if this is a TSMethodSignature, None otherwise.
Sourcepub fn as_ts_index_signature(&self) -> Option<&TSIndexSignature<'gc>>
pub fn as_ts_index_signature(&self) -> Option<&TSIndexSignature<'gc>>
The payload if this is a TSIndexSignature, None otherwise.
Sourcepub fn as_ts_call_signature_declaration(
&self,
) -> Option<&TSCallSignatureDeclaration<'gc>>
pub fn as_ts_call_signature_declaration( &self, ) -> Option<&TSCallSignatureDeclaration<'gc>>
The payload if this is a TSCallSignatureDeclaration, None
otherwise.
Sourcepub fn as_ts_modifiers(&self) -> Option<&TSModifiers<'gc>>
pub fn as_ts_modifiers(&self) -> Option<&TSModifiers<'gc>>
The payload if this is a TSModifiers, None otherwise.
Sourcepub fn as_cover_empty_args(&self) -> Option<&CoverEmptyArgs<'gc>>
pub fn as_cover_empty_args(&self) -> Option<&CoverEmptyArgs<'gc>>
The payload if this is a CoverEmptyArgs, None otherwise.
Sourcepub fn as_cover_trailing_comma(&self) -> Option<&CoverTrailingComma<'gc>>
pub fn as_cover_trailing_comma(&self) -> Option<&CoverTrailingComma<'gc>>
The payload if this is a CoverTrailingComma, None otherwise.
Sourcepub fn as_cover_initializer(&self) -> Option<&CoverInitializer<'gc>>
pub fn as_cover_initializer(&self) -> Option<&CoverInitializer<'gc>>
The payload if this is a CoverInitializer, None otherwise.
Sourcepub fn as_cover_rest_element(&self) -> Option<&CoverRestElement<'gc>>
pub fn as_cover_rest_element(&self) -> Option<&CoverRestElement<'gc>>
The payload if this is a CoverRestElement, None otherwise.
Sourcepub fn as_cover_typed_identifier(&self) -> Option<&CoverTypedIdentifier<'gc>>
pub fn as_cover_typed_identifier(&self) -> Option<&CoverTypedIdentifier<'gc>>
The payload if this is a CoverTypedIdentifier, None otherwise.
Sourcepub fn as_sh_builtin(&self) -> Option<&SHBuiltin<'gc>>
pub fn as_sh_builtin(&self) -> Option<&SHBuiltin<'gc>>
The payload if this is a SHBuiltin, None otherwise.
Sourcepub fn as_implicit_checked_cast(&self) -> Option<&ImplicitCheckedCast<'gc>>
pub fn as_implicit_checked_cast(&self) -> Option<&ImplicitCheckedCast<'gc>>
The payload if this is a ImplicitCheckedCast, None otherwise.
Sourcepub fn visit_children<V: Visitor<'gc> + ?Sized>(&'gc self, v: &mut V)
pub fn visit_children<V: Visitor<'gc> + ?Sized>(&'gc self, v: &mut V)
Visit every child node in declared order: the ESTree.def
fields plus the decoration lists the GC marker must trace.
Sourcepub fn visit_children_mut<V: VisitorMut<'gc>>(
&'gc self,
ctx: &'gc GCLock<'_, '_>,
visitor: &mut V,
) -> TransformResult<&'gc Node<'gc>>
pub fn visit_children_mut<V: VisitorMut<'gc>>( &'gc self, ctx: &'gc GCLock<'_, '_>, visitor: &mut V, ) -> TransformResult<&'gc Node<'gc>>
Transform this node’s children with visitor, rebuilding it only if
a child changed. self is the original parent.
Sourcepub fn mark_lists<F: FnMut(&NodeList<'gc>)>(&'gc self, cb: &mut F)
pub fn mark_lists<F: FnMut(&NodeList<'gc>)>(&'gc self, cb: &mut F)
Call cb on every NodeList field of this node, including
decoration lists. Used by the GC to mark list elements.
Sourcepub fn node_type_str(&self) -> &'static str
pub fn node_type_str(&self) -> &'static str
The ESTree node type name — the JSON "type" value.
Sourcepub fn dump_children<'a, 'w>(&'gc self, d: &mut ESTreeJSONDumper<'a, 'w>)
pub fn dump_children<'a, 'w>(&'gc self, d: &mut ESTreeJSONDumper<'a, 'w>)
Emit this node’s .def child fields as JSON key/values,
in declared order. Mirrors C++ visitChildren.