Changeset f80e0218 for src/SynTree/Visitor.cc
- Timestamp:
- Jun 30, 2016, 4:32:56 PM (10 years ago)
- Branches:
- ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, ctor, deferred_resn, demangler, enum, forall-pointer-decay, gc_noraii, jacob/cs343-translation, jenkins-sandbox, master, memory, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, with_gc
- Children:
- ea29e73
- Parents:
- 1b5c81ed (diff), 84d4d6f (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. - File:
-
- 1 edited
-
src/SynTree/Visitor.cc (modified) (9 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/SynTree/Visitor.cc
r1b5c81ed rf80e0218 5 5 // file "LICENCE" distributed with Cforall. 6 6 // 7 // Visitor.cc -- 7 // Visitor.cc -- 8 8 // 9 9 // Author : Richard C. Bilson 10 10 // Created On : Mon May 18 07:44:20 2015 11 // Last Modified By : Peter A. Buhr12 // Last Modified On : Fri Apr 1 18:05:13201611 // Last Modified By : Rob Schluntz 12 // Last Modified On : Wed Apr 27 17:07:40 2016 13 13 // Update Count : 18 14 14 // … … 39 39 } 40 40 41 void Visitor:: visit( AggregateDecl *aggregateDecl ) {41 void Visitor::handleAggregateDecl( AggregateDecl *aggregateDecl ) { 42 42 acceptAll( aggregateDecl->get_parameters(), *this ); 43 43 acceptAll( aggregateDecl->get_members(), *this ); … … 45 45 46 46 void Visitor::visit( StructDecl *aggregateDecl ) { 47 visit( static_cast< AggregateDecl* >( aggregateDecl ) );47 handleAggregateDecl( static_cast< AggregateDecl* >( aggregateDecl ) ); 48 48 } 49 49 50 50 void Visitor::visit( UnionDecl *aggregateDecl ) { 51 visit( static_cast< AggregateDecl* >( aggregateDecl ) );51 handleAggregateDecl( static_cast< AggregateDecl* >( aggregateDecl ) ); 52 52 } 53 53 54 54 void Visitor::visit( EnumDecl *aggregateDecl ) { 55 visit( static_cast< AggregateDecl* >( aggregateDecl ) );55 handleAggregateDecl( static_cast< AggregateDecl* >( aggregateDecl ) ); 56 56 } 57 57 58 58 void Visitor::visit( TraitDecl *aggregateDecl ) { 59 visit( static_cast< AggregateDecl* >( aggregateDecl ) );60 } 61 62 void Visitor:: visit( NamedTypeDecl *typeDecl ) {59 handleAggregateDecl( static_cast< AggregateDecl* >( aggregateDecl ) ); 60 } 61 62 void Visitor::handleNamedTypeDecl( NamedTypeDecl *typeDecl ) { 63 63 acceptAll( typeDecl->get_parameters(), *this ); 64 64 acceptAll( typeDecl->get_assertions(), *this ); … … 67 67 68 68 void Visitor::visit( TypeDecl *typeDecl ) { 69 visit( static_cast< NamedTypeDecl* >( typeDecl ) );69 handleNamedTypeDecl( static_cast< NamedTypeDecl* >( typeDecl ) ); 70 70 } 71 71 72 72 void Visitor::visit( TypedefDecl *typeDecl ) { 73 visit( static_cast< NamedTypeDecl* >( typeDecl ) );73 handleNamedTypeDecl( static_cast< NamedTypeDecl* >( typeDecl ) ); 74 74 } 75 75 … … 150 150 void Visitor::visit( DeclStmt *declStmt ) { 151 151 maybeAccept( declStmt->get_decl(), *this ); 152 } 153 154 void Visitor::visit( ImplicitCtorDtorStmt *impCtorDtorStmt ) { 155 maybeAccept( impCtorDtorStmt->get_callStmt(), *this ); 152 156 } 153 157 … … 284 288 } 285 289 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 286 296 void Visitor::visit( UntypedValofExpr *valofExpr ) { 287 297 acceptAll( valofExpr->get_results(), *this ); … … 320 330 } 321 331 322 void Visitor:: visit( ReferenceToType *aggregateUseType ) {332 void Visitor::handleReferenceToType( ReferenceToType *aggregateUseType ) { 323 333 acceptAll( aggregateUseType->get_forall(), *this ); 324 334 acceptAll( aggregateUseType->get_parameters(), *this ); … … 326 336 327 337 void Visitor::visit( StructInstType *aggregateUseType ) { 328 visit( static_cast< ReferenceToType * >( aggregateUseType ) );338 handleReferenceToType( static_cast< ReferenceToType * >( aggregateUseType ) ); 329 339 } 330 340 331 341 void Visitor::visit( UnionInstType *aggregateUseType ) { 332 visit( static_cast< ReferenceToType * >( aggregateUseType ) );342 handleReferenceToType( static_cast< ReferenceToType * >( aggregateUseType ) ); 333 343 } 334 344 335 345 void Visitor::visit( EnumInstType *aggregateUseType ) { 336 visit( static_cast< ReferenceToType * >( aggregateUseType ) );346 handleReferenceToType( static_cast< ReferenceToType * >( aggregateUseType ) ); 337 347 } 338 348 339 349 void Visitor::visit( TraitInstType *aggregateUseType ) { 340 visit( static_cast< ReferenceToType * >( aggregateUseType ) );350 handleReferenceToType( static_cast< ReferenceToType * >( aggregateUseType ) ); 341 351 acceptAll( aggregateUseType->get_members(), *this ); 342 352 } 343 353 344 354 void Visitor::visit( TypeInstType *aggregateUseType ) { 345 visit( static_cast< ReferenceToType * >( aggregateUseType ) );355 handleReferenceToType( static_cast< ReferenceToType * >( aggregateUseType ) ); 346 356 } 347 357 … … 379 389 } 380 390 391 void Visitor::visit( ConstructorInit *ctorInit ) { 392 maybeAccept( ctorInit->get_ctor(), *this ); 393 maybeAccept( ctorInit->get_init(), *this ); 394 } 395 381 396 void Visitor::visit( Subrange *subrange ) {} 382 397
Note:
See TracChangeset
for help on using the changeset viewer.