pub struct NodePtr<'gc>(pub &'gc Node<'gc>);Expand description
A wrapper around Node&, with “shallow” hashing and equality, suitable for hash tables.
Tuple Fields§
§0: &'gc Node<'gc>Implementations§
Methods from Deref<Target = 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.