Changeset fa2c005 for src/AST/Pass.impl.hpp
- Timestamp:
- Jun 8, 2023, 3:19:43 PM (3 years ago)
- Branches:
- ADT
- Parents:
- 044ae62
- File:
-
- 1 edited
-
src/AST/Pass.impl.hpp (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/AST/Pass.impl.hpp
r044ae62 rfa2c005 585 585 586 586 //-------------------------------------------------------------------------- 587 // AdtDecl 588 template< typename core_t > 589 const ast::Decl * ast::Pass< core_t >::visit( const ast::AdtDecl * node ) { 590 VISIT_START( node ); 591 592 __pass::symtab::addAdtFwd( core, 0, node ); 593 594 if ( __visit_children() ) { 595 guard_symtab guard { *this }; 596 maybe_accept( node, &AdtDecl::params ); 597 maybe_accept( node, &AdtDecl::members ); 598 maybe_accept( node, &AdtDecl::attributes ); 599 600 maybe_accept( node, &AdtDecl::data_union ); 601 maybe_accept( node, &AdtDecl::tag ); 602 maybe_accept( node, &AdtDecl::tag_union ); 603 } 604 605 __pass::symtab::addAdt( core, 0, node ); 606 VISIT_END( Decl, node ); 607 } 608 609 //-------------------------------------------------------------------------- 587 610 // UnionDecl 588 611 template< typename core_t > … … 620 643 maybe_accept( node, &EnumDecl::members ); 621 644 maybe_accept( node, &EnumDecl::attributes ); 622 623 // maybe_accept( node, &EnumDecl::data_constructors );624 // maybe_accept( node, &EnumDecl::data_union );625 // maybe_accept( node, &EnumDecl::tag );626 // maybe_accept( node, &EnumDecl::tag_union );627 645 } else { 628 646 maybe_accept( node, &EnumDecl::base ); … … 630 648 maybe_accept( node, &EnumDecl::members ); 631 649 maybe_accept( node, &EnumDecl::attributes ); 632 633 // maybe_accept( node, &EnumDecl::data_constructors ); 634 // maybe_accept( node, &EnumDecl::data_union ); 635 // maybe_accept( node, &EnumDecl::tag ); 636 // maybe_accept( node, &EnumDecl::tag_union ); 637 } 638 } 639 640 VISIT_END( Decl, node ); 641 } 642 643 template< typename core_t > 644 const ast::Decl * ast::Pass< core_t >::visit( const ast::AdtDecl * node ) { 645 VISIT_START( node ); 646 647 __pass::symtab::addAdt( core, 0, node ); 648 649 if ( __visit_children() ) { 650 guard_symtab guard { *this }; 651 maybe_accept( node, &AdtDecl::params ); 652 maybe_accept( node, &AdtDecl::members ); 653 maybe_accept( node, &AdtDecl::attributes ); 654 655 maybe_accept( node, &AdtDecl::data_constructors ); 656 maybe_accept( node, &AdtDecl::data_union ); 657 maybe_accept( node, &AdtDecl::tag ); 658 maybe_accept( node, &AdtDecl::tag_union ); 650 } 659 651 } 660 652 … … 1967 1959 1968 1960 //-------------------------------------------------------------------------- 1961 // AdtInstType 1962 template< typename core_t > 1963 const ast::Type * ast::Pass< core_t >::visit( const ast::AdtInstType * node ) { 1964 VISIT_START( node ); 1965 1966 __pass::symtab::addAdt( core, 0, node->name ); 1967 1968 if ( __visit_children() ) { 1969 guard_symtab guard { *this }; 1970 maybe_accept( node, &AdtInstType::params ); 1971 } 1972 1973 VISIT_END( Type, node ); 1974 } 1975 1976 //-------------------------------------------------------------------------- 1969 1977 // UnionInstType 1970 1978 template< typename core_t >
Note:
See TracChangeset
for help on using the changeset viewer.