Changeset 561354f for src/Common
- Timestamp:
- May 17, 2023, 1:33:39 AM (3 years ago)
- Branches:
- ADT
- Children:
- d6c464d
- Parents:
- 28f8f15
- Location:
- src/Common
- Files:
-
- 4 edited
-
CodeLocationTools.cpp (modified) (1 diff)
-
PassVisitor.h (modified) (3 diffs)
-
PassVisitor.impl.h (modified) (2 diffs)
-
PassVisitor.proto.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
src/Common/CodeLocationTools.cpp
r28f8f15 r561354f 105 105 macro(UnionDecl, Decl) \ 106 106 macro(EnumDecl, Decl) \ 107 macro(AdtDecl, Decl) \ 107 108 macro(TraitDecl, Decl) \ 108 109 macro(TypeDecl, Decl) \ -
src/Common/PassVisitor.h
r28f8f15 r561354f 69 69 virtual void visit( EnumDecl * aggregateDecl ) override final; 70 70 virtual void visit( const EnumDecl * aggregateDecl ) override final; 71 virtual void visit( AdtDecl * aggregateDecl ) override final; 72 virtual void visit( const AdtDecl * AggregateDecl ) override final; 71 73 virtual void visit( TraitDecl * aggregateDecl ) override final; 72 74 virtual void visit( const TraitDecl * aggregateDecl ) override final; … … 269 271 virtual Declaration * mutate( UnionDecl * aggregateDecl ) override final; 270 272 virtual Declaration * mutate( EnumDecl * aggregateDecl ) override final; 273 virtual Declaration * mutate( AdtDecl * aggregateDecl ) override final; 271 274 virtual Declaration * mutate( TraitDecl * aggregateDecl ) override final; 272 275 virtual Declaration * mutate( TypeDecl * typeDecl ) override final; … … 439 442 void indexerAddStructFwd( const StructDecl * node ) { indexer_impl_addStructFwd( pass, 0, node ); } 440 443 void indexerAddEnum ( const EnumDecl * node ) { indexer_impl_addEnum ( pass, 0, node ); } 444 void indexerAddAdt ( const AdtDecl * node ) { indexer_impl_addAdt ( pass, 0, node ); } 441 445 void indexerAddUnion ( const std::string & id ) { indexer_impl_addUnion ( pass, 0, id ); } 442 446 void indexerAddUnion ( const UnionDecl * node ) { indexer_impl_addUnion ( pass, 0, node ); } -
src/Common/PassVisitor.impl.h
r28f8f15 r561354f 754 754 755 755 // unlike structs, traits, and unions, enums inject their members into the global scope 756 maybeAccept_impl( node->data_constructors, *this );757 maybeAccept_impl( node->data_union, *this );758 maybeAccept_impl( node->tags, *this );759 756 maybeAccept_impl( node->parameters, *this ); 760 757 maybeAccept_impl( node->members , *this ); … … 785 782 786 783 // unlike structs, traits, and unions, enums inject their members into the global scope 784 maybeMutate_impl( node->parameters, *this ); 785 maybeMutate_impl( node->members , *this ); 786 maybeMutate_impl( node->attributes, *this ); 787 788 MUTATE_END( Declaration, node ); 789 } 790 791 template< typename pass_type > 792 void PassVisitor< pass_type >::visit( AdtDecl * node ) { 793 VISIT_START( node ); 794 795 indexerAddAdt( node ); 796 797 // unlike structs, traits, and unions, enums inject their members into the global scope 798 maybeAccept_impl( node->data_constructors, *this ); 799 maybeAccept_impl( node->data_union, *this ); 800 maybeAccept_impl( node->tag, *this ); 801 802 maybeAccept_impl( node->parameters, *this ); 803 maybeAccept_impl( node->members , *this ); 804 maybeAccept_impl( node->attributes, *this ); 805 806 VISIT_END( node ); 807 } 808 809 template< typename pass_type > 810 void PassVisitor< pass_type >::visit( const AdtDecl * node ) { 811 VISIT_START( node ); 812 813 maybeAccept_impl( node->data_constructors, *this ); 814 maybeAccept_impl( node->data_union, *this ); 815 maybeAccept_impl( node->tag, *this ); 816 817 maybeAccept_impl( node->parameters, *this ); 818 maybeAccept_impl( node->members , *this ); 819 maybeAccept_impl( node->attributes, *this ); 820 821 822 VISIT_END( node ); 823 } 824 825 template< typename pass_type > 826 Declaration * PassVisitor< pass_type >::mutate( AdtDecl * node ) { 827 MUTATE_START( node ); 828 829 maybeMutate_impl( node->data_constructors, *this ); 830 maybeMutate_impl( node->data_union, *this ); 831 maybeMutate_impl( node->tag, *this ); 832 787 833 maybeMutate_impl( node->parameters, *this ); 788 834 maybeMutate_impl( node->members , *this ); -
src/Common/PassVisitor.proto.h
r28f8f15 r561354f 233 233 INDEXER_FUNC1( addStruct , const StructDecl * ); 234 234 INDEXER_FUNC1( addEnum , const EnumDecl * ); 235 INDEXER_FUNC1( addAdt , const AdtDecl * ); 235 236 INDEXER_FUNC1( addUnion , const UnionDecl * ); 236 237 INDEXER_FUNC1( addTrait , const TraitDecl * );
Note:
See TracChangeset
for help on using the changeset viewer.