Ignore:
Timestamp:
May 17, 2023, 1:33:39 AM (15 months ago)
Author:
JiadaL <j82liang@…>
Branches:
ADT
Children:
d6c464d
Parents:
28f8f15
Message:

Save progress

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/Common/PassVisitor.impl.h

    r28f8f15 r561354f  
    754754
    755755        // 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 );
    759756        maybeAccept_impl( node->parameters, *this );
    760757        maybeAccept_impl( node->members   , *this );
     
    785782
    786783        // 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
     791template< typename pass_type >
     792void 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
     809template< typename pass_type >
     810void 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
     825template< typename pass_type >
     826Declaration * 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
    787833        maybeMutate_impl( node->parameters, *this );
    788834        maybeMutate_impl( node->members   , *this );
Note: See TracChangeset for help on using the changeset viewer.