Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/SynTree/Visitor.cc

    r1e1e15b r630a82a  
    55// file "LICENCE" distributed with Cforall.
    66//
    7 // Visitor.cc --
     7// Visitor.cc -- 
    88//
    99// Author           : Richard C. Bilson
    1010// Created On       : Mon May 18 07:44:20 2015
    11 // Last Modified By : Rob Schluntz
    12 // Last Modified On : Wed Apr 27 17:07:40 2016
     11// Last Modified By : Peter A. Buhr
     12// Last Modified On : Fri Apr  1 18:05:13 2016
    1313// Update Count     : 18
    1414//
     
    3939}
    4040
    41 void Visitor::handleAggregateDecl( AggregateDecl *aggregateDecl ) {
     41void Visitor::visit( AggregateDecl *aggregateDecl ) {
    4242        acceptAll( aggregateDecl->get_parameters(), *this );
    4343        acceptAll( aggregateDecl->get_members(), *this );
     
    4545
    4646void Visitor::visit( StructDecl *aggregateDecl ) {
    47         handleAggregateDecl( static_cast< AggregateDecl* >( aggregateDecl ) );
     47        visit( static_cast< AggregateDecl* >( aggregateDecl ) );
    4848}
    4949
    5050void Visitor::visit( UnionDecl *aggregateDecl ) {
    51         handleAggregateDecl( static_cast< AggregateDecl* >( aggregateDecl ) );
     51        visit( static_cast< AggregateDecl* >( aggregateDecl ) );
    5252}
    5353
    5454void Visitor::visit( EnumDecl *aggregateDecl ) {
    55         handleAggregateDecl( static_cast< AggregateDecl* >( aggregateDecl ) );
     55        visit( static_cast< AggregateDecl* >( aggregateDecl ) );
    5656}
    5757
    5858void Visitor::visit( TraitDecl *aggregateDecl ) {
    59         handleAggregateDecl( static_cast< AggregateDecl* >( aggregateDecl ) );
    60 }
    61 
    62 void Visitor::handleNamedTypeDecl( NamedTypeDecl *typeDecl ) {
     59        visit( static_cast< AggregateDecl* >( aggregateDecl ) );
     60}
     61
     62void Visitor::visit( NamedTypeDecl *typeDecl ) {
    6363        acceptAll( typeDecl->get_parameters(), *this );
    6464        acceptAll( typeDecl->get_assertions(), *this );
     
    6767
    6868void Visitor::visit( TypeDecl *typeDecl ) {
    69         handleNamedTypeDecl( static_cast< NamedTypeDecl* >( typeDecl ) );
     69        visit( static_cast< NamedTypeDecl* >( typeDecl ) );
    7070}
    7171
    7272void Visitor::visit( TypedefDecl *typeDecl ) {
    73         handleNamedTypeDecl( static_cast< NamedTypeDecl* >( typeDecl ) );
     73        visit( static_cast< NamedTypeDecl* >( typeDecl ) );
    7474}
    7575
     
    150150void Visitor::visit( DeclStmt *declStmt ) {
    151151        maybeAccept( declStmt->get_decl(), *this );
    152 }
    153 
    154 void Visitor::visit( ImplicitCtorDtorStmt *impCtorDtorStmt ) {
    155         maybeAccept( impCtorDtorStmt->get_callStmt(), *this );
    156152}
    157153
     
    234230}
    235231
    236 void Visitor::visit( OffsetPackExpr *offsetPackExpr ) {
    237         acceptAll( offsetPackExpr->get_results(), *this );
    238         maybeAccept( offsetPackExpr->get_type(), *this );
    239 }
    240 
    241232void Visitor::visit( AttrExpr *attrExpr ) {
    242233        acceptAll( attrExpr->get_results(), *this );
     
    288279}
    289280
    290 void Visitor::visit( ImplicitCopyCtorExpr *impCpCtorExpr ) {
    291         maybeAccept( impCpCtorExpr->get_callExpr(), *this );
    292         acceptAll( impCpCtorExpr->get_tempDecls(), *this );
    293         acceptAll( impCpCtorExpr->get_returnDecls(), *this );
    294 }
    295 
    296281void Visitor::visit( UntypedValofExpr *valofExpr ) {
    297282        acceptAll( valofExpr->get_results(), *this );
     
    330315}
    331316
    332 void Visitor::handleReferenceToType( ReferenceToType *aggregateUseType ) {
     317void Visitor::visit( ReferenceToType *aggregateUseType ) {
    333318        acceptAll( aggregateUseType->get_forall(), *this );
    334319        acceptAll( aggregateUseType->get_parameters(), *this );
     
    336321
    337322void Visitor::visit( StructInstType *aggregateUseType ) {
    338         handleReferenceToType( static_cast< ReferenceToType * >( aggregateUseType ) );
     323        visit( static_cast< ReferenceToType * >( aggregateUseType ) );
    339324}
    340325
    341326void Visitor::visit( UnionInstType *aggregateUseType ) {
    342         handleReferenceToType( static_cast< ReferenceToType * >( aggregateUseType ) );
     327        visit( static_cast< ReferenceToType * >( aggregateUseType ) );
    343328}
    344329
    345330void Visitor::visit( EnumInstType *aggregateUseType ) {
    346         handleReferenceToType( static_cast< ReferenceToType * >( aggregateUseType ) );
     331        visit( static_cast< ReferenceToType * >( aggregateUseType ) );
    347332}
    348333
    349334void Visitor::visit( TraitInstType *aggregateUseType ) {
    350         handleReferenceToType( static_cast< ReferenceToType * >( aggregateUseType ) );
     335        visit( static_cast< ReferenceToType * >( aggregateUseType ) );
    351336        acceptAll( aggregateUseType->get_members(), *this );
    352337}
    353338
    354339void Visitor::visit( TypeInstType *aggregateUseType ) {
    355         handleReferenceToType( static_cast< ReferenceToType * >( aggregateUseType ) );
     340        visit( static_cast< ReferenceToType * >( aggregateUseType ) );
    356341}
    357342
     
    389374}
    390375
    391 void Visitor::visit( ConstructorInit *ctorInit ) {
    392         maybeAccept( ctorInit->get_ctor(), *this );
    393         maybeAccept( ctorInit->get_init(), *this );
    394 }
    395 
    396376void Visitor::visit( Subrange *subrange ) {}
    397377
Note: See TracChangeset for help on using the changeset viewer.