Changeset 2d019af for src/Common


Ignore:
Timestamp:
Mar 12, 2021, 11:14:29 PM (4 years ago)
Author:
Peter A. Buhr <pabuhr@…>
Branches:
ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, master, new-ast-unique-expr, pthread-emulation, qualifiedEnum
Children:
41ca6fa, e867b44
Parents:
6083392
Message:

parser global pragmas, fixes #241

Location:
src/Common
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • src/Common/CodeLocationTools.cpp

    r6083392 r2d019af  
    99// Author           : Andrew Beach
    1010// Created On       : Fri Dec  4 15:42:00 2020
    11 // Last Modified By : Andrew Beach
    12 // Last Modified On : Wed Dec  9  9:42:00 2020
    13 // Update Count     : 1
     11// Last Modified By : Peter A. Buhr
     12// Last Modified On : Fri Mar 12 18:35:37 2021
     13// Update Count     : 2
    1414//
    1515
     
    102102    macro(TypedefDecl, Decl) \
    103103    macro(AsmDecl, AsmDecl) \
     104    macro(DirectiveDecl, DirectiveDecl) \
    104105    macro(StaticAssertDecl, StaticAssertDecl) \
    105106    macro(CompoundStmt, CompoundStmt) \
  • src/Common/PassVisitor.h

    r6083392 r2d019af  
    7777        virtual void visit( AsmDecl * asmDecl ) override final;
    7878        virtual void visit( const AsmDecl * asmDecl ) override final;
     79        virtual void visit( DirectiveDecl * directiveDecl ) override final;
     80        virtual void visit( const DirectiveDecl * directiveDecl ) override final;
    7981        virtual void visit( StaticAssertDecl * assertDecl ) override final;
    8082        virtual void visit( const StaticAssertDecl * assertDecl ) override final;
     
    261263        virtual Declaration * mutate( TypedefDecl * typeDecl ) override final;
    262264        virtual AsmDecl * mutate( AsmDecl * asmDecl ) override final;
     265        virtual DirectiveDecl * mutate( DirectiveDecl * directiveDecl ) override final;
    263266        virtual StaticAssertDecl * mutate( StaticAssertDecl * assertDecl ) override final;
    264267
  • src/Common/PassVisitor.impl.h

    r6083392 r2d019af  
    973973
    974974//--------------------------------------------------------------------------
     975// DirectiveDecl
     976template< typename pass_type >
     977void PassVisitor< pass_type >::visit( DirectiveDecl * node ) {
     978        VISIT_START( node );
     979
     980        maybeAccept_impl( node->stmt, *this );
     981
     982        VISIT_END( node );
     983}
     984
     985template< typename pass_type >
     986void PassVisitor< pass_type >::visit( const DirectiveDecl * node ) {
     987        VISIT_START( node );
     988
     989        maybeAccept_impl( node->stmt, *this );
     990
     991        VISIT_END( node );
     992}
     993
     994template< typename pass_type >
     995DirectiveDecl * PassVisitor< pass_type >::mutate( DirectiveDecl * node ) {
     996        MUTATE_START( node );
     997
     998        maybeMutate_impl( node->stmt, *this );
     999
     1000        MUTATE_END( DirectiveDecl, node );
     1001}
     1002
     1003//--------------------------------------------------------------------------
    9751004// StaticAssertDecl
    9761005template< typename pass_type >
Note: See TracChangeset for help on using the changeset viewer.