Changes in src/SynTree/Visitor.cc [630a82a:1e1e15b]
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/SynTree/Visitor.cc
r630a82a r1e1e15b 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 … … 230 234 } 231 235 236 void Visitor::visit( OffsetPackExpr *offsetPackExpr ) { 237 acceptAll( offsetPackExpr->get_results(), *this ); 238 maybeAccept( offsetPackExpr->get_type(), *this ); 239 } 240 232 241 void Visitor::visit( AttrExpr *attrExpr ) { 233 242 acceptAll( attrExpr->get_results(), *this ); … … 279 288 } 280 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 281 296 void Visitor::visit( UntypedValofExpr *valofExpr ) { 282 297 acceptAll( valofExpr->get_results(), *this ); … … 315 330 } 316 331 317 void Visitor:: visit( ReferenceToType *aggregateUseType ) {332 void Visitor::handleReferenceToType( ReferenceToType *aggregateUseType ) { 318 333 acceptAll( aggregateUseType->get_forall(), *this ); 319 334 acceptAll( aggregateUseType->get_parameters(), *this ); … … 321 336 322 337 void Visitor::visit( StructInstType *aggregateUseType ) { 323 visit( static_cast< ReferenceToType * >( aggregateUseType ) );338 handleReferenceToType( static_cast< ReferenceToType * >( aggregateUseType ) ); 324 339 } 325 340 326 341 void Visitor::visit( UnionInstType *aggregateUseType ) { 327 visit( static_cast< ReferenceToType * >( aggregateUseType ) );342 handleReferenceToType( static_cast< ReferenceToType * >( aggregateUseType ) ); 328 343 } 329 344 330 345 void Visitor::visit( EnumInstType *aggregateUseType ) { 331 visit( static_cast< ReferenceToType * >( aggregateUseType ) );346 handleReferenceToType( static_cast< ReferenceToType * >( aggregateUseType ) ); 332 347 } 333 348 334 349 void Visitor::visit( TraitInstType *aggregateUseType ) { 335 visit( static_cast< ReferenceToType * >( aggregateUseType ) );350 handleReferenceToType( static_cast< ReferenceToType * >( aggregateUseType ) ); 336 351 acceptAll( aggregateUseType->get_members(), *this ); 337 352 } 338 353 339 354 void Visitor::visit( TypeInstType *aggregateUseType ) { 340 visit( static_cast< ReferenceToType * >( aggregateUseType ) );355 handleReferenceToType( static_cast< ReferenceToType * >( aggregateUseType ) ); 341 356 } 342 357 … … 374 389 } 375 390 391 void Visitor::visit( ConstructorInit *ctorInit ) { 392 maybeAccept( ctorInit->get_ctor(), *this ); 393 maybeAccept( ctorInit->get_init(), *this ); 394 } 395 376 396 void Visitor::visit( Subrange *subrange ) {} 377 397
Note:
See TracChangeset
for help on using the changeset viewer.