Ignore:
Timestamp:
Jul 4, 2017, 9:40:16 AM (7 years ago)
Author:
Rob Schluntz <rschlunt@…>
Branches:
ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, deferred_resn, demangler, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, with_gc
Children:
208e5be
Parents:
9c951e3 (diff), f7cb0bc (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge branch 'master' into references

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/SynTree/Visitor.cc

    r9c951e3 rb1e63ac5  
    99// Author           : Richard C. Bilson
    1010// Created On       : Mon May 18 07:44:20 2015
    11 // Last Modified By : Peter A. Buhr
    12 // Last Modified On : Thu Mar 30 16:45:25 2017
    13 // Update Count     : 24
     11// Last Modified By : Andrew Beach
     12// Last Modified On : Thu Jun 22 13:41:00 2017
     13// Update Count     : 26
    1414//
    1515
     
    6767void Visitor::visit( TypeDecl *typeDecl ) {
    6868        handleNamedTypeDecl( static_cast< NamedTypeDecl* >( typeDecl ) );
     69        maybeAccept( typeDecl->get_init(), *this );
    6970}
    7071
     
    121122}
    122123
    123 void Visitor::visit( BranchStmt *branchStmt ) {
     124void Visitor::visit( __attribute__((unused)) BranchStmt *branchStmt ) {
    124125}
    125126
    126127void Visitor::visit( ReturnStmt *returnStmt ) {
    127128        maybeAccept( returnStmt->get_expr(), *this );
     129}
     130
     131void Visitor::visit( ThrowStmt * throwStmt ) {
     132        maybeAccept( throwStmt->get_expr(), *this );
     133        maybeAccept( throwStmt->get_target(), *this );
    128134}
    129135
     
    131137        maybeAccept( tryStmt->get_block(), *this );
    132138        acceptAll( tryStmt->get_catchers(), *this );
     139        maybeAccept( tryStmt->get_finally(), *this );
    133140}
    134141
    135142void Visitor::visit( CatchStmt *catchStmt ) {
    136143        maybeAccept( catchStmt->get_decl(), *this );
     144        maybeAccept( catchStmt->get_cond(), *this );
    137145        maybeAccept( catchStmt->get_body(), *this );
    138146}
     
    142150}
    143151
    144 void Visitor::visit( NullStmt *nullStmt ) {
     152void Visitor::visit( __attribute__((unused)) NullStmt *nullStmt ) {
    145153}
    146154
     
    295303}
    296304
    297 void Visitor::visit( UntypedValofExpr *valofExpr ) {
    298         maybeAccept( valofExpr->get_result(), *this );
    299         maybeAccept( valofExpr->get_body(), *this );
    300 }
    301 
    302305void Visitor::visit( RangeExpr *rangeExpr ) {
    303306        maybeAccept( rangeExpr->get_low(), *this );
     
    318321        maybeAccept( tupleExpr->get_result(), *this );
    319322        maybeAccept( tupleExpr->get_tuple(), *this );
    320 }
    321 
    322 void Visitor::visit( MemberTupleExpr *tupleExpr ) {
    323         maybeAccept( tupleExpr->get_result(), *this );
    324         maybeAccept( tupleExpr->get_member(), *this );
    325         maybeAccept( tupleExpr->get_aggregate(), *this );
    326323}
    327324
     
    343340}
    344341
     342void Visitor::visit( UntypedInitExpr * initExpr ) {
     343        maybeAccept( initExpr->get_result(), *this );
     344        maybeAccept( initExpr->get_expr(), *this );
     345        // not currently visiting initAlts, but this doesn't matter since this node is only used in the resolver.
     346}
     347
     348void Visitor::visit( InitExpr * initExpr ) {
     349        maybeAccept( initExpr->get_result(), *this );
     350        maybeAccept( initExpr->get_expr(), *this );
     351        maybeAccept( initExpr->get_designation(), *this );
     352}
     353
    345354
    346355void Visitor::visit( VoidType *voidType ) {
     
    404413        acceptAll( tupleType->get_forall(), *this );
    405414        acceptAll( tupleType->get_types(), *this );
     415        acceptAll( tupleType->get_members(), *this );
    406416}
    407417
     
    433443}
    434444
     445void Visitor::visit( Designation * designation ) {
     446        acceptAll( designation->get_designators(), *this );
     447}
    435448
    436449void Visitor::visit( SingleInit *singleInit ) {
     
    439452
    440453void Visitor::visit( ListInit *listInit ) {
    441         acceptAll( listInit->get_designators(), *this );
     454        acceptAll( listInit->get_designations(), *this );
    442455        acceptAll( listInit->get_initializers(), *this );
    443456}
     
    450463
    451464
    452 void Visitor::visit( Subrange *subrange ) {}
    453 
    454 
    455 void Visitor::visit( Constant *constant ) {}
     465void Visitor::visit( __attribute__((unused)) Subrange *subrange ) {}
     466
     467
     468void Visitor::visit( __attribute__((unused)) Constant *constant ) {}
    456469// Local Variables: //
    457470// tab-width: 4 //
Note: See TracChangeset for help on using the changeset viewer.