Changeset 87701b6 for src/AST/Pass.impl.hpp
- Timestamp:
- May 16, 2019, 4:13:19 PM (5 years ago)
- Branches:
- ADT, arm-eh, ast-experimental, cleanup-dtors, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, pthread-emulation, qualifiedEnum
- Children:
- e61207e7
- Parents:
- 1fb7bfd
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/AST/Pass.impl.hpp
r1fb7bfd r87701b6 462 462 VISIT({ 463 463 guard_indexer guard { * this }; 464 maybe_accept( node, &StructDecl::param eters);465 maybe_accept( node, &StructDecl::members 464 maybe_accept( node, &StructDecl::params ); 465 maybe_accept( node, &StructDecl::members ); 466 466 }) 467 467 … … 483 483 VISIT({ 484 484 guard_indexer guard { * this }; 485 maybe_accept( node, &UnionDecl::param eters);486 maybe_accept( node, &UnionDecl::members 485 maybe_accept( node, &UnionDecl::params ); 486 maybe_accept( node, &UnionDecl::members ); 487 487 }) 488 488 … … 502 502 VISIT( 503 503 // unlike structs, traits, and unions, enums inject their members into the global scope 504 maybe_accept( node, &EnumDecl::param eters);505 maybe_accept( node, &EnumDecl::members 504 maybe_accept( node, &EnumDecl::params ); 505 maybe_accept( node, &EnumDecl::members ); 506 506 ) 507 507 … … 517 517 VISIT({ 518 518 guard_indexer guard { *this }; 519 maybe_accept( node, &TraitDecl::param eters);520 maybe_accept( node, &TraitDecl::members 519 maybe_accept( node, &TraitDecl::params ); 520 maybe_accept( node, &TraitDecl::members ); 521 521 }) 522 522 … … 534 534 VISIT({ 535 535 guard_indexer guard { *this }; 536 maybe_accept( node, &TypeDecl::param eters );537 maybe_accept( node, &TypeDecl::base 536 maybe_accept( node, &TypeDecl::params ); 537 maybe_accept( node, &TypeDecl::base ); 538 538 }) 539 539 … … 563 563 VISIT({ 564 564 guard_indexer guard { *this }; 565 maybe_accept( node, &TypedefDecl::param eters );566 maybe_accept( node, &TypedefDecl::base 565 maybe_accept( node, &TypedefDecl::params ); 566 maybe_accept( node, &TypedefDecl::base ); 567 567 }) 568 568 … … 690 690 691 691 VISIT_END( Stmt, node ); 692 } 693 694 //-------------------------------------------------------------------------- 695 // ForStmt 696 template< typename pass_t > 697 const ast::Stmt * ast::Pass< pass_t >::visit( const ast::ForStmt * node ) { 698 VISIT_START( node ); 699 700 VISIT({ 701 // for statements introduce a level of scope (for the initialization) 702 guard_indexer guard { *this }; 703 maybe_accept( node, &ForStmt::inits ); 704 maybe_accept( node, &ForStmt::cond ); 705 maybe_accept( node, &ForStmt::inc ); 706 maybe_accept( node, &ForStmt::body ); 707 }) 708 709 VISIT_END( Stmt, node ); 710 } 711 712 //-------------------------------------------------------------------------- 713 // SwitchStmt 714 template< typename pass_t > 715 const ast::Stmt * ast::Pass< pass_t >::visit( const ast::SwitchStmt * node ) { 716 VISIT_START( node ); 717 718 VISIT( 719 maybe_accept( node, &SwitchStmt::cond ); 720 maybe_accept( node, &SwitchStmt::stmts ); 721 ) 722 723 VISIT_END( Stmt, node ); 724 } 725 726 //-------------------------------------------------------------------------- 727 // CaseStmt 728 template< typename pass_t > 729 const ast::Stmt * ast::Pass< pass_t >::visit( const ast::CaseStmt * node ) { 730 VISIT_START( node ); 731 732 VISIT( 733 maybe_accept( node, &CaseStmt::cond ); 734 maybe_accept( node, &CaseStmt::stmts ); 735 ) 736 737 VISIT_END( Stmt, node ); 738 } 739 740 //-------------------------------------------------------------------------- 741 // BranchStmt 742 template< typename pass_t > 743 const ast::Stmt * ast::Pass< pass_t >::visit( const ast::BranchStmt * node ) { 744 VISIT_START( node ); 745 VISIT_END( Stmt, node ); 746 } 747 748 //-------------------------------------------------------------------------- 749 // ReturnStmt 750 template< typename pass_t > 751 const ast::Stmt * ast::Pass< pass_t >::visit( const ast::ReturnStmt * node ) { 752 VISIT_START( node ); 753 754 maybe_accept( node, &ReturnStmt::expr ); 755 756 VISIT_END( Stmt, node ); 757 } 758 759 //-------------------------------------------------------------------------- 760 // ThrowStmt 761 762 template< typename pass_type > 763 void PassVisitor< pass_type >::visit( ThrowStmt * node ) { 764 VISIT_START( node ); 765 766 maybeAccept_impl( node->expr, *this ); 767 maybeAccept_impl( node->target, *this ); 768 769 VISIT_END( node ); 692 770 } 693 771
Note: See TracChangeset
for help on using the changeset viewer.