Changes in src/SynTree/Visitor.cc [1e1e15b:630a82a]
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/SynTree/Visitor.cc
r1e1e15b r630a82a 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 : Rob Schluntz12 // Last Modified On : Wed Apr 27 17:07:40201611 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Fri Apr 1 18:05:13 2016 13 13 // Update Count : 18 14 14 // … … 39 39 } 40 40 41 void Visitor:: handleAggregateDecl( AggregateDecl *aggregateDecl ) {41 void Visitor::visit( 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 handleAggregateDecl( static_cast< AggregateDecl* >( aggregateDecl ) );47 visit( static_cast< AggregateDecl* >( aggregateDecl ) ); 48 48 } 49 49 50 50 void Visitor::visit( UnionDecl *aggregateDecl ) { 51 handleAggregateDecl( static_cast< AggregateDecl* >( aggregateDecl ) );51 visit( static_cast< AggregateDecl* >( aggregateDecl ) ); 52 52 } 53 53 54 54 void Visitor::visit( EnumDecl *aggregateDecl ) { 55 handleAggregateDecl( static_cast< AggregateDecl* >( aggregateDecl ) );55 visit( static_cast< AggregateDecl* >( aggregateDecl ) ); 56 56 } 57 57 58 58 void 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 62 void Visitor::visit( 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 handleNamedTypeDecl( static_cast< NamedTypeDecl* >( typeDecl ) );69 visit( static_cast< NamedTypeDecl* >( typeDecl ) ); 70 70 } 71 71 72 72 void Visitor::visit( TypedefDecl *typeDecl ) { 73 handleNamedTypeDecl( static_cast< NamedTypeDecl* >( typeDecl ) );73 visit( 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 );156 152 } 157 153 … … 234 230 } 235 231 236 void Visitor::visit( OffsetPackExpr *offsetPackExpr ) {237 acceptAll( offsetPackExpr->get_results(), *this );238 maybeAccept( offsetPackExpr->get_type(), *this );239 }240 241 232 void Visitor::visit( AttrExpr *attrExpr ) { 242 233 acceptAll( attrExpr->get_results(), *this ); … … 288 279 } 289 280 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 296 281 void Visitor::visit( UntypedValofExpr *valofExpr ) { 297 282 acceptAll( valofExpr->get_results(), *this ); … … 330 315 } 331 316 332 void Visitor:: handleReferenceToType( ReferenceToType *aggregateUseType ) {317 void Visitor::visit( ReferenceToType *aggregateUseType ) { 333 318 acceptAll( aggregateUseType->get_forall(), *this ); 334 319 acceptAll( aggregateUseType->get_parameters(), *this ); … … 336 321 337 322 void Visitor::visit( StructInstType *aggregateUseType ) { 338 handleReferenceToType( static_cast< ReferenceToType * >( aggregateUseType ) );323 visit( static_cast< ReferenceToType * >( aggregateUseType ) ); 339 324 } 340 325 341 326 void Visitor::visit( UnionInstType *aggregateUseType ) { 342 handleReferenceToType( static_cast< ReferenceToType * >( aggregateUseType ) );327 visit( static_cast< ReferenceToType * >( aggregateUseType ) ); 343 328 } 344 329 345 330 void Visitor::visit( EnumInstType *aggregateUseType ) { 346 handleReferenceToType( static_cast< ReferenceToType * >( aggregateUseType ) );331 visit( static_cast< ReferenceToType * >( aggregateUseType ) ); 347 332 } 348 333 349 334 void Visitor::visit( TraitInstType *aggregateUseType ) { 350 handleReferenceToType( static_cast< ReferenceToType * >( aggregateUseType ) );335 visit( static_cast< ReferenceToType * >( aggregateUseType ) ); 351 336 acceptAll( aggregateUseType->get_members(), *this ); 352 337 } 353 338 354 339 void Visitor::visit( TypeInstType *aggregateUseType ) { 355 handleReferenceToType( static_cast< ReferenceToType * >( aggregateUseType ) );340 visit( static_cast< ReferenceToType * >( aggregateUseType ) ); 356 341 } 357 342 … … 389 374 } 390 375 391 void Visitor::visit( ConstructorInit *ctorInit ) {392 maybeAccept( ctorInit->get_ctor(), *this );393 maybeAccept( ctorInit->get_init(), *this );394 }395 396 376 void Visitor::visit( Subrange *subrange ) {} 397 377
Note:
See TracChangeset
for help on using the changeset viewer.