pub struct Printer<'a> { /* private fields */ }
Expand description
Printing visitor
Recursively prints the AST tree as indented list of AST nodes, one node per line. Each line contains name of the AST node type, followed by the enum variant (when it does not match name of contained node), and primitive fields.
Implementations§
Trait Implementations§
Source§impl<'ast, 'a> Visit<'ast> for Printer<'a>
impl<'ast, 'a> Visit<'ast> for Printer<'a>
fn visit_identifier(&mut self, n: &'ast Identifier, span: &'ast Span)
fn visit_constant(&mut self, n: &'ast Constant, span: &'ast Span)
fn visit_integer(&mut self, n: &'ast Integer, span: &'ast Span)
fn visit_integer_base(&mut self, n: &'ast IntegerBase, span: &'ast Span)
fn visit_integer_suffix(&mut self, n: &'ast IntegerSuffix, span: &'ast Span)
fn visit_integer_size(&mut self, n: &'ast IntegerSize, span: &'ast Span)
fn visit_float(&mut self, n: &'ast Float, span: &'ast Span)
fn visit_float_base(&mut self, n: &'ast FloatBase, span: &'ast Span)
fn visit_float_suffix(&mut self, n: &'ast FloatSuffix, span: &'ast Span)
fn visit_float_format(&mut self, n: &'ast FloatFormat, span: &'ast Span)
fn visit_string_literal(&mut self, n: &'ast StringLiteral, span: &'ast Span)
fn visit_expression(&mut self, n: &'ast Expression, span: &'ast Span)
fn visit_member_operator(&mut self, n: &'ast MemberOperator, span: &'ast Span)
fn visit_generic_selection( &mut self, n: &'ast GenericSelection, span: &'ast Span, )
fn visit_generic_association( &mut self, n: &'ast GenericAssociation, span: &'ast Span, )
fn visit_generic_association_type( &mut self, n: &'ast GenericAssociationType, span: &'ast Span, )
fn visit_member_expression( &mut self, n: &'ast MemberExpression, span: &'ast Span, )
fn visit_call_expression(&mut self, n: &'ast CallExpression, span: &'ast Span)
fn visit_compound_literal(&mut self, n: &'ast CompoundLiteral, span: &'ast Span)
fn visit_sizeofty(&mut self, n: &'ast SizeOfTy, span: &'ast Span)
fn visit_sizeofval(&mut self, n: &'ast SizeOfVal, span: &'ast Span)
fn visit_alignof(&mut self, n: &'ast AlignOf, span: &'ast Span)
fn visit_unary_operator(&mut self, n: &'ast UnaryOperator, span: &'ast Span)
fn visit_unary_operator_expression( &mut self, n: &'ast UnaryOperatorExpression, span: &'ast Span, )
fn visit_cast_expression(&mut self, n: &'ast CastExpression, span: &'ast Span)
fn visit_binary_operator(&mut self, n: &'ast BinaryOperator, span: &'ast Span)
fn visit_binary_operator_expression( &mut self, n: &'ast BinaryOperatorExpression, span: &'ast Span, )
fn visit_conditional_expression( &mut self, n: &'ast ConditionalExpression, span: &'ast Span, )
fn visit_va_arg_expression( &mut self, n: &'ast VaArgExpression, span: &'ast Span, )
fn visit_offset_of_expression( &mut self, n: &'ast OffsetOfExpression, span: &'ast Span, )
fn visit_offset_designator( &mut self, n: &'ast OffsetDesignator, span: &'ast Span, )
fn visit_offset_member(&mut self, n: &'ast OffsetMember, span: &'ast Span)
fn visit_declaration(&mut self, n: &'ast Declaration, span: &'ast Span)
fn visit_declaration_specifier( &mut self, n: &'ast DeclarationSpecifier, span: &'ast Span, )
fn visit_init_declarator(&mut self, n: &'ast InitDeclarator, span: &'ast Span)
fn visit_storage_class_specifier( &mut self, n: &'ast StorageClassSpecifier, span: &'ast Span, )
fn visit_type_specifier(&mut self, n: &'ast TypeSpecifier, span: &'ast Span)
fn visit_ts18661_float_type( &mut self, n: &'ast TS18661FloatType, span: &'ast Span, )
fn visit_ts18661_float_format( &mut self, n: &'ast TS18661FloatFormat, span: &'ast Span, )
fn visit_struct_type(&mut self, n: &'ast StructType, span: &'ast Span)
fn visit_struct_kind(&mut self, n: &'ast StructKind, span: &'ast Span)
fn visit_struct_declaration( &mut self, n: &'ast StructDeclaration, span: &'ast Span, )
fn visit_struct_field(&mut self, n: &'ast StructField, span: &'ast Span)
fn visit_specifier_qualifier( &mut self, n: &'ast SpecifierQualifier, span: &'ast Span, )
fn visit_struct_declarator( &mut self, n: &'ast StructDeclarator, span: &'ast Span, )
fn visit_enum_type(&mut self, n: &'ast EnumType, span: &'ast Span)
fn visit_enumerator(&mut self, n: &'ast Enumerator, span: &'ast Span)
fn visit_type_qualifier(&mut self, n: &'ast TypeQualifier, span: &'ast Span)
fn visit_function_specifier( &mut self, n: &'ast FunctionSpecifier, span: &'ast Span, )
fn visit_alignment_specifier( &mut self, n: &'ast AlignmentSpecifier, span: &'ast Span, )
fn visit_declarator(&mut self, n: &'ast Declarator, span: &'ast Span)
fn visit_declarator_kind(&mut self, n: &'ast DeclaratorKind, span: &'ast Span)
fn visit_derived_declarator( &mut self, n: &'ast DerivedDeclarator, span: &'ast Span, )
fn visit_array_declarator(&mut self, n: &'ast ArrayDeclarator, span: &'ast Span)
fn visit_function_declarator( &mut self, n: &'ast FunctionDeclarator, span: &'ast Span, )
fn visit_pointer_qualifier( &mut self, n: &'ast PointerQualifier, span: &'ast Span, )
fn visit_array_size(&mut self, n: &'ast ArraySize, span: &'ast Span)
fn visit_parameter_declaration( &mut self, n: &'ast ParameterDeclaration, span: &'ast Span, )
fn visit_ellipsis(&mut self, n: &'ast Ellipsis, span: &'ast Span)
fn visit_type_name(&mut self, n: &'ast TypeName, span: &'ast Span)
fn visit_initializer(&mut self, n: &'ast Initializer, span: &'ast Span)
fn visit_initializer_list_item( &mut self, n: &'ast InitializerListItem, span: &'ast Span, )
fn visit_designator(&mut self, n: &'ast Designator, span: &'ast Span)
fn visit_range_designator(&mut self, n: &'ast RangeDesignator, span: &'ast Span)
fn visit_static_assert(&mut self, n: &'ast StaticAssert, span: &'ast Span)
fn visit_statement(&mut self, n: &'ast Statement, span: &'ast Span)
fn visit_labeled_statement( &mut self, n: &'ast LabeledStatement, span: &'ast Span, )
fn visit_if_statement(&mut self, n: &'ast IfStatement, span: &'ast Span)
fn visit_switch_statement(&mut self, n: &'ast SwitchStatement, span: &'ast Span)
fn visit_while_statement(&mut self, n: &'ast WhileStatement, span: &'ast Span)
fn visit_do_while_statement( &mut self, n: &'ast DoWhileStatement, span: &'ast Span, )
fn visit_for_statement(&mut self, n: &'ast ForStatement, span: &'ast Span)
fn visit_label(&mut self, n: &'ast Label, span: &'ast Span)
fn visit_case_range(&mut self, n: &'ast CaseRange, span: &'ast Span)
fn visit_for_initializer(&mut self, n: &'ast ForInitializer, span: &'ast Span)
fn visit_block_item(&mut self, n: &'ast BlockItem, span: &'ast Span)
fn visit_external_declaration( &mut self, n: &'ast ExternalDeclaration, span: &'ast Span, )
fn visit_function_definition( &mut self, n: &'ast FunctionDefinition, span: &'ast Span, )
fn visit_extension(&mut self, n: &'ast Extension, span: &'ast Span)
fn visit_attribute(&mut self, n: &'ast Attribute, span: &'ast Span)
fn visit_asm_statement(&mut self, n: &'ast AsmStatement, span: &'ast Span)
fn visit_availability_attribute( &mut self, n: &'ast AvailabilityAttribute, span: &'ast Span, )
fn visit_gnu_extended_asm_statement( &mut self, n: &'ast GnuExtendedAsmStatement, span: &'ast Span, )
fn visit_gnu_asm_operand(&mut self, n: &'ast GnuAsmOperand, span: &'ast Span)
fn visit_type_of(&mut self, n: &'ast TypeOf, span: &'ast Span)
fn visit_translation_unit(&mut self, translation_unit: &'ast TranslationUnit)
fn visit_availability_clause( &mut self, _clause: &'ast AvailabilityClause, _span: &'ast Span, )
Auto Trait Implementations§
impl<'a> Freeze for Printer<'a>
impl<'a> !RefUnwindSafe for Printer<'a>
impl<'a> !Send for Printer<'a>
impl<'a> !Sync for Printer<'a>
impl<'a> Unpin for Printer<'a>
impl<'a> !UnwindSafe for Printer<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more