Changeset f4e01f1 for src/Common
- Timestamp:
- May 17, 2023, 4:27:25 PM (2 years ago)
- Branches:
- ADT
- Children:
- 3a513d89
- Parents:
- d6c464d
- Location:
- src/Common
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
src/Common/PassVisitor.h
rd6c464d rf4e01f1 443 443 void indexerAddEnum ( const EnumDecl * node ) { indexer_impl_addEnum ( pass, 0, node ); } 444 444 void indexerAddAdt ( const AdtDecl * node ) { indexer_impl_addAdt ( pass, 0, node ); } 445 void indexerAddAdtFwd ( const AdtDecl * node ) { indexer_impl_addAdtFwd ( pass, 0, node ); } 445 446 void indexerAddUnion ( const std::string & id ) { indexer_impl_addUnion ( pass, 0, id ); } 446 447 void indexerAddUnion ( const UnionDecl * node ) { indexer_impl_addUnion ( pass, 0, node ); } -
src/Common/PassVisitor.impl.h
rd6c464d rf4e01f1 793 793 VISIT_START( node ); 794 794 795 indexerAddAdt ( node );795 indexerAddAdtFwd( node ); 796 796 797 797 // unlike structs, traits, and unions, enums inject their members into the global scope … … 811 811 VISIT_START( node ); 812 812 813 indexerAddAdtFwd( node ); 814 813 815 maybeAccept_impl( node->data_constructors, *this ); 814 816 maybeAccept_impl( node->data_union, *this ); … … 826 828 Declaration * PassVisitor< pass_type >::mutate( AdtDecl * node ) { 827 829 MUTATE_START( node ); 830 831 indexerAddAdtFwd( node ); 828 832 829 833 maybeMutate_impl( node->data_constructors, *this ); -
src/Common/PassVisitor.proto.h
rd6c464d rf4e01f1 252 252 253 253 template<typename pass_type> 254 static inline auto indexer_impl_addAdtFwd( pass_type & pass, int, const AdtDecl * decl ) -> decltype( pass.indexer.addAdt( decl ), void() ) { 255 AdtDecl * fwd = new AdtDecl( decl->name ); 256 cloneAll( decl->parameters, fwd->parameters ); 257 258 // Experimental 259 for ( const StructDecl * ctor : fwd->data_constructors ) { 260 indexer_impl_addStructFwd( pass, 0, ctor ); 261 } 262 263 pass.indexer.addAdt( fwd ); 264 } 265 266 template<typename pass_type> 267 static inline auto indexer_impl_addAdtFwd( pass_type &, long, const AdtDecl * ) {} 268 269 template<typename pass_type> 254 270 static inline auto indexer_impl_addUnionFwd( pass_type & pass, int, const UnionDecl * decl ) -> decltype( pass.indexer.addUnion( decl ), void() ) { 255 271 UnionDecl * fwd = new UnionDecl( decl->name );
Note:
See TracChangeset
for help on using the changeset viewer.