Changeset 2b7bf59


Ignore:
Timestamp:
Sep 27, 2017, 3:50:09 PM (4 years ago)
Author:
Rob Schluntz <rschlunt@…>
Branches:
arm-eh, cleanup-dtors, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr
Children:
7c3f3be
Parents:
a139c11
Message:

Make Attribute a child of BaseSyntaxNode?

Location:
src
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • src/CodeGen/CodeGenerator.cc

    ra139c11 r2b7bf59  
    540540                extension( nameExpr );
    541541                OperatorInfo opInfo;
    542                 if ( operatorLookup( nameExpr->get_name(), opInfo ) ) {
    543                         assert( opInfo.type == OT_CONSTANT );
    544                         output << opInfo.symbol;
     542                if ( operatorLookup( nameExpr->name, opInfo ) ) {
     543                        if ( opInfo.type == OT_CONSTANT ) {
     544                                output << opInfo.symbol;
     545                        } else {
     546                                output << opInfo.outputName;
     547                        }
    545548                } else {
    546549                        output << nameExpr->get_name();
  • src/Common/PassVisitor.h

    ra139c11 r2b7bf59  
    1010#include "SymTab/Indexer.h"
    1111
     12#include "SynTree/Attribute.h"
    1213#include "SynTree/Initializer.h"
    1314#include "SynTree/Statement.h"
     
    5354        pass_type pass;
    5455
    55         virtual void visit( ObjectDecl *objectDecl ) override final;
    56         virtual void visit( FunctionDecl *functionDecl ) override final;
    57         virtual void visit( StructDecl *aggregateDecl ) override final;
    58         virtual void visit( UnionDecl *aggregateDecl ) override final;
    59         virtual void visit( EnumDecl *aggregateDecl ) override final;
    60         virtual void visit( TraitDecl *aggregateDecl ) override final;
    61         virtual void visit( TypeDecl *typeDecl ) override final;
    62         virtual void visit( TypedefDecl *typeDecl ) override final;
    63         virtual void visit( AsmDecl *asmDecl ) override final;
    64 
    65         virtual void visit( CompoundStmt *compoundStmt ) override final;
    66         virtual void visit( ExprStmt *exprStmt ) override final;
    67         virtual void visit( AsmStmt *asmStmt ) override final;
    68         virtual void visit( IfStmt *ifStmt ) override final;
    69         virtual void visit( WhileStmt *whileStmt ) override final;
    70         virtual void visit( ForStmt *forStmt ) override final;
    71         virtual void visit( SwitchStmt *switchStmt ) override final;
    72         virtual void visit( CaseStmt *caseStmt ) override final;
    73         virtual void visit( BranchStmt *branchStmt ) override final;
    74         virtual void visit( ReturnStmt *returnStmt ) override final;
    75         virtual void visit( ThrowStmt *throwStmt ) override final;
    76         virtual void visit( TryStmt *tryStmt ) override final;
    77         virtual void visit( CatchStmt *catchStmt ) override final;
    78         virtual void visit( FinallyStmt *finallyStmt ) override final;
    79         virtual void visit( WaitForStmt *waitforStmt ) override final;
    80         virtual void visit( NullStmt *nullStmt ) override final;
    81         virtual void visit( DeclStmt *declStmt ) override final;
    82         virtual void visit( ImplicitCtorDtorStmt *impCtorDtorStmt ) override final;
    83 
    84         virtual void visit( ApplicationExpr *applicationExpr ) override final;
    85         virtual void visit( UntypedExpr *untypedExpr ) override final;
    86         virtual void visit( NameExpr *nameExpr ) override final;
    87         virtual void visit( CastExpr *castExpr ) override final;
    88         virtual void visit( VirtualCastExpr *castExpr ) override final;
    89         virtual void visit( AddressExpr *addressExpr ) override final;
    90         virtual void visit( LabelAddressExpr *labAddressExpr ) override final;
    91         virtual void visit( UntypedMemberExpr *memberExpr ) override final;
    92         virtual void visit( MemberExpr *memberExpr ) override final;
    93         virtual void visit( VariableExpr *variableExpr ) override final;
    94         virtual void visit( ConstantExpr *constantExpr ) override final;
    95         virtual void visit( SizeofExpr *sizeofExpr ) override final;
    96         virtual void visit( AlignofExpr *alignofExpr ) override final;
    97         virtual void visit( UntypedOffsetofExpr *offsetofExpr ) override final;
    98         virtual void visit( OffsetofExpr *offsetofExpr ) override final;
    99         virtual void visit( OffsetPackExpr *offsetPackExpr ) override final;
    100         virtual void visit( AttrExpr *attrExpr ) override final;
    101         virtual void visit( LogicalExpr *logicalExpr ) override final;
    102         virtual void visit( ConditionalExpr *conditionalExpr ) override final;
    103         virtual void visit( CommaExpr *commaExpr ) override final;
    104         virtual void visit( TypeExpr *typeExpr ) override final;
    105         virtual void visit( AsmExpr *asmExpr ) override final;
    106         virtual void visit( ImplicitCopyCtorExpr *impCpCtorExpr ) override final;
    107         virtual void visit( ConstructorExpr * ctorExpr ) override final;
    108         virtual void visit( CompoundLiteralExpr *compLitExpr ) override final;
    109         virtual void visit( RangeExpr *rangeExpr ) override final;
    110         virtual void visit( UntypedTupleExpr *tupleExpr ) override final;
    111         virtual void visit( TupleExpr *tupleExpr ) override final;
    112         virtual void visit( TupleIndexExpr *tupleExpr ) override final;
    113         virtual void visit( TupleAssignExpr *assignExpr ) override final;
    114         virtual void visit( StmtExpr * stmtExpr ) override final;
    115         virtual void visit( UniqueExpr * uniqueExpr ) override final;
    116 
    117         virtual void visit( VoidType *basicType ) override final;
    118         virtual void visit( BasicType *basicType ) override final;
    119         virtual void visit( PointerType *pointerType ) override final;
    120         virtual void visit( ArrayType *arrayType ) override final;
    121         virtual void visit( ReferenceType *referenceType ) override final;
    122         virtual void visit( FunctionType *functionType ) override final;
    123         virtual void visit( StructInstType *aggregateUseType ) override final;
    124         virtual void visit( UnionInstType *aggregateUseType ) override final;
    125         virtual void visit( EnumInstType *aggregateUseType ) override final;
    126         virtual void visit( TraitInstType *aggregateUseType ) override final;
    127         virtual void visit( TypeInstType *aggregateUseType ) override final;
    128         virtual void visit( TupleType *tupleType ) override final;
    129         virtual void visit( TypeofType *typeofType ) override final;
    130         virtual void visit( AttrType *attrType ) override final;
    131         virtual void visit( VarArgsType *varArgsType ) override final;
    132         virtual void visit( ZeroType *zeroType ) override final;
    133         virtual void visit( OneType *oneType ) override final;
    134 
    135         virtual void visit( Designation *designation ) override final;
    136         virtual void visit( SingleInit *singleInit ) override final;
    137         virtual void visit( ListInit *listInit ) override final;
    138         virtual void visit( ConstructorInit *ctorInit ) override final;
    139 
    140         virtual void visit( Subrange *subrange ) override final;
    141 
    142         virtual void visit( Constant *constant ) override final;
    143 
    144         virtual DeclarationWithType* mutate( ObjectDecl *objectDecl ) override final;
    145         virtual DeclarationWithType* mutate( FunctionDecl *functionDecl ) override final;
    146         virtual Declaration* mutate( StructDecl *aggregateDecl ) override final;
    147         virtual Declaration* mutate( UnionDecl *aggregateDecl ) override final;
    148         virtual Declaration* mutate( EnumDecl *aggregateDecl ) override final;
    149         virtual Declaration* mutate( TraitDecl *aggregateDecl ) override final;
    150         virtual Declaration* mutate( TypeDecl *typeDecl ) override final;
    151         virtual Declaration* mutate( TypedefDecl *typeDecl ) override final;
    152         virtual AsmDecl* mutate( AsmDecl *asmDecl ) override final;
    153 
    154         virtual CompoundStmt* mutate( CompoundStmt *compoundStmt ) override final;
    155         virtual Statement* mutate( ExprStmt *exprStmt ) override final;
    156         virtual Statement* mutate( AsmStmt *asmStmt ) override final;
    157         virtual Statement* mutate( IfStmt *ifStmt ) override final;
    158         virtual Statement* mutate( WhileStmt *whileStmt ) override final;
    159         virtual Statement* mutate( ForStmt *forStmt ) override final;
    160         virtual Statement* mutate( SwitchStmt *switchStmt ) override final;
    161         virtual Statement* mutate( CaseStmt *caseStmt ) override final;
    162         virtual Statement* mutate( BranchStmt *branchStmt ) override final;
    163         virtual Statement* mutate( ReturnStmt *returnStmt ) override final;
    164         virtual Statement* mutate( ThrowStmt *throwStmt ) override final;
    165         virtual Statement* mutate( TryStmt *tryStmt ) override final;
    166         virtual Statement* mutate( CatchStmt *catchStmt ) override final;
    167         virtual Statement* mutate( FinallyStmt *finallyStmt ) override final;
    168         virtual Statement* mutate( WaitForStmt *waitforStmt ) override final;
    169         virtual NullStmt* mutate( NullStmt *nullStmt ) override final;
    170         virtual Statement* mutate( DeclStmt *declStmt ) override final;
    171         virtual Statement* mutate( ImplicitCtorDtorStmt *impCtorDtorStmt ) override final;
    172 
    173         virtual Expression* mutate( ApplicationExpr *applicationExpr ) override final;
    174         virtual Expression* mutate( UntypedExpr *untypedExpr ) override final;
    175         virtual Expression* mutate( NameExpr *nameExpr ) override final;
    176         virtual Expression* mutate( AddressExpr *castExpr ) override final;
    177         virtual Expression* mutate( LabelAddressExpr *labAddressExpr ) override final;
    178         virtual Expression* mutate( CastExpr *castExpr ) override final;
    179         virtual Expression* mutate( VirtualCastExpr *castExpr ) override final;
    180         virtual Expression* mutate( UntypedMemberExpr *memberExpr ) override final;
    181         virtual Expression* mutate( MemberExpr *memberExpr ) override final;
    182         virtual Expression* mutate( VariableExpr *variableExpr ) override final;
    183         virtual Expression* mutate( ConstantExpr *constantExpr ) override final;
    184         virtual Expression* mutate( SizeofExpr *sizeofExpr ) override final;
    185         virtual Expression* mutate( AlignofExpr *alignofExpr ) override final;
    186         virtual Expression* mutate( UntypedOffsetofExpr *offsetofExpr ) override final;
    187         virtual Expression* mutate( OffsetofExpr *offsetofExpr ) override final;
    188         virtual Expression* mutate( OffsetPackExpr *offsetPackExpr ) override final;
    189         virtual Expression* mutate( AttrExpr *attrExpr ) override final;
    190         virtual Expression* mutate( LogicalExpr *logicalExpr ) override final;
    191         virtual Expression* mutate( ConditionalExpr *conditionalExpr ) override final;
    192         virtual Expression* mutate( CommaExpr *commaExpr ) override final;
    193         virtual Expression* mutate( TypeExpr *typeExpr ) override final;
    194         virtual Expression* mutate( AsmExpr *asmExpr ) override final;
    195         virtual Expression* mutate( ImplicitCopyCtorExpr *impCpCtorExpr ) override final;
    196         virtual Expression* mutate( ConstructorExpr *ctorExpr ) override final;
    197         virtual Expression* mutate( CompoundLiteralExpr *compLitExpr ) override final;
    198         virtual Expression* mutate( RangeExpr *rangeExpr ) override final;
    199         virtual Expression* mutate( UntypedTupleExpr *tupleExpr ) override final;
    200         virtual Expression* mutate( TupleExpr *tupleExpr ) override final;
    201         virtual Expression* mutate( TupleIndexExpr *tupleExpr ) override final;
    202         virtual Expression* mutate( TupleAssignExpr *assignExpr ) override final;
    203         virtual Expression* mutate( StmtExpr * stmtExpr ) override final;
    204         virtual Expression* mutate( UniqueExpr * uniqueExpr ) override final;
    205 
    206         virtual Type* mutate( VoidType *basicType ) override final;
    207         virtual Type* mutate( BasicType *basicType ) override final;
    208         virtual Type* mutate( PointerType *pointerType ) override final;
    209         virtual Type* mutate( ArrayType *arrayType ) override final;
    210         virtual Type* mutate( ReferenceType *referenceType ) override final;
    211         virtual Type* mutate( FunctionType *functionType ) override final;
    212         virtual Type* mutate( StructInstType *aggregateUseType ) override final;
    213         virtual Type* mutate( UnionInstType *aggregateUseType ) override final;
    214         virtual Type* mutate( EnumInstType *aggregateUseType ) override final;
    215         virtual Type* mutate( TraitInstType *aggregateUseType ) override final;
    216         virtual Type* mutate( TypeInstType *aggregateUseType ) override final;
    217         virtual Type* mutate( TupleType *tupleType ) override final;
    218         virtual Type* mutate( TypeofType *typeofType ) override final;
    219         virtual Type* mutate( AttrType *attrType ) override final;
    220         virtual Type* mutate( VarArgsType *varArgsType ) override final;
    221         virtual Type* mutate( ZeroType *zeroType ) override final;
    222         virtual Type* mutate( OneType *oneType ) override final;
    223 
    224         virtual Designation* mutate( Designation *designation ) override final;
    225         virtual Initializer* mutate( SingleInit *singleInit ) override final;
    226         virtual Initializer* mutate( ListInit *listInit ) override final;
    227         virtual Initializer* mutate( ConstructorInit *ctorInit ) override final;
    228 
    229         virtual Subrange *mutate( Subrange *subrange ) override final;
    230 
    231         virtual Constant *mutate( Constant *constant ) override final;
     56        virtual void visit( ObjectDecl * objectDecl ) override final;
     57        virtual void visit( FunctionDecl * functionDecl ) override final;
     58        virtual void visit( StructDecl * aggregateDecl ) override final;
     59        virtual void visit( UnionDecl * aggregateDecl ) override final;
     60        virtual void visit( EnumDecl * aggregateDecl ) override final;
     61        virtual void visit( TraitDecl * aggregateDecl ) override final;
     62        virtual void visit( TypeDecl * typeDecl ) override final;
     63        virtual void visit( TypedefDecl * typeDecl ) override final;
     64        virtual void visit( AsmDecl * asmDecl ) override final;
     65
     66        virtual void visit( CompoundStmt * compoundStmt ) override final;
     67        virtual void visit( ExprStmt * exprStmt ) override final;
     68        virtual void visit( AsmStmt * asmStmt ) override final;
     69        virtual void visit( IfStmt * ifStmt ) override final;
     70        virtual void visit( WhileStmt * whileStmt ) override final;
     71        virtual void visit( ForStmt * forStmt ) override final;
     72        virtual void visit( SwitchStmt * switchStmt ) override final;
     73        virtual void visit( CaseStmt * caseStmt ) override final;
     74        virtual void visit( BranchStmt * branchStmt ) override final;
     75        virtual void visit( ReturnStmt * returnStmt ) override final;
     76        virtual void visit( ThrowStmt * throwStmt ) override final;
     77        virtual void visit( TryStmt * tryStmt ) override final;
     78        virtual void visit( CatchStmt * catchStmt ) override final;
     79        virtual void visit( FinallyStmt * finallyStmt ) override final;
     80        virtual void visit( WaitForStmt * waitforStmt ) override final;
     81        virtual void visit( NullStmt * nullStmt ) override final;
     82        virtual void visit( DeclStmt * declStmt ) override final;
     83        virtual void visit( ImplicitCtorDtorStmt * impCtorDtorStmt ) override final;
     84
     85        virtual void visit( ApplicationExpr * applicationExpr ) override final;
     86        virtual void visit( UntypedExpr * untypedExpr ) override final;
     87        virtual void visit( NameExpr * nameExpr ) override final;
     88        virtual void visit( CastExpr * castExpr ) override final;
     89        virtual void visit( VirtualCastExpr * castExpr ) override final;
     90        virtual void visit( AddressExpr * addressExpr ) override final;
     91        virtual void visit( LabelAddressExpr * labAddressExpr ) override final;
     92        virtual void visit( UntypedMemberExpr * memberExpr ) override final;
     93        virtual void visit( MemberExpr * memberExpr ) override final;
     94        virtual void visit( VariableExpr * variableExpr ) override final;
     95        virtual void visit( ConstantExpr * constantExpr ) override final;
     96        virtual void visit( SizeofExpr * sizeofExpr ) override final;
     97        virtual void visit( AlignofExpr * alignofExpr ) override final;
     98        virtual void visit( UntypedOffsetofExpr * offsetofExpr ) override final;
     99        virtual void visit( OffsetofExpr * offsetofExpr ) override final;
     100        virtual void visit( OffsetPackExpr * offsetPackExpr ) override final;
     101        virtual void visit( AttrExpr * attrExpr ) override final;
     102        virtual void visit( LogicalExpr * logicalExpr ) override final;
     103        virtual void visit( ConditionalExpr * conditionalExpr ) override final;
     104        virtual void visit( CommaExpr * commaExpr ) override final;
     105        virtual void visit( TypeExpr * typeExpr ) override final;
     106        virtual void visit( AsmExpr * asmExpr ) override final;
     107        virtual void visit( ImplicitCopyCtorExpr * impCpCtorExpr ) override final;
     108        virtual void visit( ConstructorExpr *  ctorExpr ) override final;
     109        virtual void visit( CompoundLiteralExpr * compLitExpr ) override final;
     110        virtual void visit( RangeExpr * rangeExpr ) override final;
     111        virtual void visit( UntypedTupleExpr * tupleExpr ) override final;
     112        virtual void visit( TupleExpr * tupleExpr ) override final;
     113        virtual void visit( TupleIndexExpr * tupleExpr ) override final;
     114        virtual void visit( TupleAssignExpr * assignExpr ) override final;
     115        virtual void visit( StmtExpr *  stmtExpr ) override final;
     116        virtual void visit( UniqueExpr *  uniqueExpr ) override final;
     117
     118        virtual void visit( VoidType * basicType ) override final;
     119        virtual void visit( BasicType * basicType ) override final;
     120        virtual void visit( PointerType * pointerType ) override final;
     121        virtual void visit( ArrayType * arrayType ) override final;
     122        virtual void visit( ReferenceType * referenceType ) override final;
     123        virtual void visit( FunctionType * functionType ) override final;
     124        virtual void visit( StructInstType * aggregateUseType ) override final;
     125        virtual void visit( UnionInstType * aggregateUseType ) override final;
     126        virtual void visit( EnumInstType * aggregateUseType ) override final;
     127        virtual void visit( TraitInstType * aggregateUseType ) override final;
     128        virtual void visit( TypeInstType * aggregateUseType ) override final;
     129        virtual void visit( TupleType * tupleType ) override final;
     130        virtual void visit( TypeofType * typeofType ) override final;
     131        virtual void visit( AttrType * attrType ) override final;
     132        virtual void visit( VarArgsType * varArgsType ) override final;
     133        virtual void visit( ZeroType * zeroType ) override final;
     134        virtual void visit( OneType * oneType ) override final;
     135
     136        virtual void visit( Designation * designation ) override final;
     137        virtual void visit( SingleInit * singleInit ) override final;
     138        virtual void visit( ListInit * listInit ) override final;
     139        virtual void visit( ConstructorInit * ctorInit ) override final;
     140
     141        virtual void visit( Subrange * subrange ) override final;
     142
     143        virtual void visit( Constant * constant ) override final;
     144
     145        virtual void visit( Attribute * attribute ) override final;
     146
     147        virtual DeclarationWithType * mutate( ObjectDecl * objectDecl ) override final;
     148        virtual DeclarationWithType * mutate( FunctionDecl * functionDecl ) override final;
     149        virtual Declaration * mutate( StructDecl * aggregateDecl ) override final;
     150        virtual Declaration * mutate( UnionDecl * aggregateDecl ) override final;
     151        virtual Declaration * mutate( EnumDecl * aggregateDecl ) override final;
     152        virtual Declaration * mutate( TraitDecl * aggregateDecl ) override final;
     153        virtual Declaration * mutate( TypeDecl * typeDecl ) override final;
     154        virtual Declaration * mutate( TypedefDecl * typeDecl ) override final;
     155        virtual AsmDecl * mutate( AsmDecl * asmDecl ) override final;
     156
     157        virtual CompoundStmt * mutate( CompoundStmt * compoundStmt ) override final;
     158        virtual Statement * mutate( ExprStmt * exprStmt ) override final;
     159        virtual Statement * mutate( AsmStmt * asmStmt ) override final;
     160        virtual Statement * mutate( IfStmt * ifStmt ) override final;
     161        virtual Statement * mutate( WhileStmt * whileStmt ) override final;
     162        virtual Statement * mutate( ForStmt * forStmt ) override final;
     163        virtual Statement * mutate( SwitchStmt * switchStmt ) override final;
     164        virtual Statement * mutate( CaseStmt * caseStmt ) override final;
     165        virtual Statement * mutate( BranchStmt * branchStmt ) override final;
     166        virtual Statement * mutate( ReturnStmt * returnStmt ) override final;
     167        virtual Statement * mutate( ThrowStmt * throwStmt ) override final;
     168        virtual Statement * mutate( TryStmt * tryStmt ) override final;
     169        virtual Statement * mutate( CatchStmt * catchStmt ) override final;
     170        virtual Statement * mutate( FinallyStmt * finallyStmt ) override final;
     171        virtual Statement * mutate( WaitForStmt * waitforStmt ) override final;
     172        virtual NullStmt * mutate( NullStmt * nullStmt ) override final;
     173        virtual Statement * mutate( DeclStmt * declStmt ) override final;
     174        virtual Statement * mutate( ImplicitCtorDtorStmt * impCtorDtorStmt ) override final;
     175
     176        virtual Expression * mutate( ApplicationExpr * applicationExpr ) override final;
     177        virtual Expression * mutate( UntypedExpr * untypedExpr ) override final;
     178        virtual Expression * mutate( NameExpr * nameExpr ) override final;
     179        virtual Expression * mutate( AddressExpr * castExpr ) override final;
     180        virtual Expression * mutate( LabelAddressExpr * labAddressExpr ) override final;
     181        virtual Expression * mutate( CastExpr * castExpr ) override final;
     182        virtual Expression * mutate( VirtualCastExpr * castExpr ) override final;
     183        virtual Expression * mutate( UntypedMemberExpr * memberExpr ) override final;
     184        virtual Expression * mutate( MemberExpr * memberExpr ) override final;
     185        virtual Expression * mutate( VariableExpr * variableExpr ) override final;
     186        virtual Expression * mutate( ConstantExpr * constantExpr ) override final;
     187        virtual Expression * mutate( SizeofExpr * sizeofExpr ) override final;
     188        virtual Expression * mutate( AlignofExpr * alignofExpr ) override final;
     189        virtual Expression * mutate( UntypedOffsetofExpr * offsetofExpr ) override final;
     190        virtual Expression * mutate( OffsetofExpr * offsetofExpr ) override final;
     191        virtual Expression * mutate( OffsetPackExpr * offsetPackExpr ) override final;
     192        virtual Expression * mutate( AttrExpr * attrExpr ) override final;
     193        virtual Expression * mutate( LogicalExpr * logicalExpr ) override final;
     194        virtual Expression * mutate( ConditionalExpr * conditionalExpr ) override final;
     195        virtual Expression * mutate( CommaExpr * commaExpr ) override final;
     196        virtual Expression * mutate( TypeExpr * typeExpr ) override final;
     197        virtual Expression * mutate( AsmExpr * asmExpr ) override final;
     198        virtual Expression * mutate( ImplicitCopyCtorExpr * impCpCtorExpr ) override final;
     199        virtual Expression * mutate( ConstructorExpr * ctorExpr ) override final;
     200        virtual Expression * mutate( CompoundLiteralExpr * compLitExpr ) override final;
     201        virtual Expression * mutate( RangeExpr * rangeExpr ) override final;
     202        virtual Expression * mutate( UntypedTupleExpr * tupleExpr ) override final;
     203        virtual Expression * mutate( TupleExpr * tupleExpr ) override final;
     204        virtual Expression * mutate( TupleIndexExpr * tupleExpr ) override final;
     205        virtual Expression * mutate( TupleAssignExpr * assignExpr ) override final;
     206        virtual Expression * mutate( StmtExpr *  stmtExpr ) override final;
     207        virtual Expression * mutate( UniqueExpr *  uniqueExpr ) override final;
     208
     209        virtual Type * mutate( VoidType * basicType ) override final;
     210        virtual Type * mutate( BasicType * basicType ) override final;
     211        virtual Type * mutate( PointerType * pointerType ) override final;
     212        virtual Type * mutate( ArrayType * arrayType ) override final;
     213        virtual Type * mutate( ReferenceType * referenceType ) override final;
     214        virtual Type * mutate( FunctionType * functionType ) override final;
     215        virtual Type * mutate( StructInstType * aggregateUseType ) override final;
     216        virtual Type * mutate( UnionInstType * aggregateUseType ) override final;
     217        virtual Type * mutate( EnumInstType * aggregateUseType ) override final;
     218        virtual Type * mutate( TraitInstType * aggregateUseType ) override final;
     219        virtual Type * mutate( TypeInstType * aggregateUseType ) override final;
     220        virtual Type * mutate( TupleType * tupleType ) override final;
     221        virtual Type * mutate( TypeofType * typeofType ) override final;
     222        virtual Type * mutate( AttrType * attrType ) override final;
     223        virtual Type * mutate( VarArgsType * varArgsType ) override final;
     224        virtual Type * mutate( ZeroType * zeroType ) override final;
     225        virtual Type * mutate( OneType * oneType ) override final;
     226
     227        virtual Designation * mutate( Designation * designation ) override final;
     228        virtual Initializer * mutate( SingleInit * singleInit ) override final;
     229        virtual Initializer * mutate( ListInit * listInit ) override final;
     230        virtual Initializer * mutate( ConstructorInit * ctorInit ) override final;
     231
     232        virtual Subrange * mutate( Subrange * subrange ) override final;
     233
     234        virtual Constant * mutate( Constant * constant ) override final;
     235
     236        virtual Attribute * mutate( Attribute * attribute ) override final;
    232237
    233238private:
  • src/Common/PassVisitor.impl.h

    ra139c11 r2b7bf59  
    321321        maybeAccept        ( node->init         , *this );
    322322        maybeAccept        ( node->bitfieldWidth, *this );
     323        maybeAccept        ( node->attributes   , *this );
    323324
    324325        if ( node->name != "" ) {
     
    336337        maybeMutateRef     ( node->init         , *this );
    337338        maybeMutateRef     ( node->bitfieldWidth, *this );
     339        maybeMutateRef     ( node->attributes   , *this );
    338340
    339341        if ( node->name != "" ) {
     
    358360                maybeAccept( node->type, *this );
    359361                maybeAccept( node->statements, *this );
     362                maybeAccept( node->attributes, *this );
    360363        }
    361364
     
    375378                maybeMutateRef( node->type, *this );
    376379                maybeMutateRef( node->statements, *this );
     380                maybeMutateRef( node->attributes, *this );
    377381        }
    378382
     
    19841988}
    19851989
     1990template< typename pass_type >
     1991void PassVisitor< pass_type >::visit( Attribute * node ) {
     1992        VISIT_BODY( node );
     1993}
     1994
    19861995//---------------------------------------------------------------------------------------------------------------
    19871996template< typename pass_type >
     
    20692078        MUTATE_BODY( Constant, node );
    20702079}
     2080
     2081template< typename pass_type >
     2082Attribute * PassVisitor< pass_type >::mutate( Attribute * node  )  {
     2083        MUTATE_BODY( Attribute, node );
     2084}
  • src/SynTree/Attribute.h

    ra139c11 r2b7bf59  
    2020#include <string>  // for string, operator==
    2121
     22#include "BaseSyntaxNode.h"
     23#include "Mutator.h"
     24#include "Visitor.h"
     25
    2226class Expression;
    2327
    2428// GCC attribute
    2529// https://gcc.gnu.org/onlinedocs/gcc-6.1.0/gcc/Attribute-Syntax.html#Attribute-Syntax
    26 class Attribute {
     30class Attribute : public BaseSyntaxNode {
    2731  public:
     32        std::string name;
     33        // to keep things nice and tight, use NameExpr for special identifier parameters
     34        std::list< Expression * > parameters;
     35
    2836        Attribute( std::string name = "", const std::list< Expression * > & parameters = std::list< Expression * >() ) : name( name ), parameters( parameters ) {}
    2937        Attribute( const Attribute &other );
     
    3644
    3745        Attribute * clone() const { return new Attribute( *this ); }
    38         void print( std:: ostream &os, int indent = 0 ) const;
    39   private:
    40         std::string name;
    41         // to keep things nice and tight, use NameExpr for special identifier parameters
    42         std::list< Expression * > parameters;
     46        virtual void accept( Visitor & v ) { v.visit( this ); }
     47        virtual Attribute * acceptMutator( Mutator & m ) { return m.mutate( this ); }
     48        virtual void print( std::ostream & os, int indent = 0 ) const;
    4349};
    4450
  • src/SynTree/BaseSyntaxNode.h

    ra139c11 r2b7bf59  
    1818#include "Common/CodeLocation.h"
    1919class Visitor;
     20class Mutator;
    2021
    2122class BaseSyntaxNode {
     
    2526        virtual ~BaseSyntaxNode() {}
    2627
     28        virtual BaseSyntaxNode * clone() const = 0;
    2729        virtual void accept( Visitor & v ) = 0;
    28         virtual void print( std::ostream & os, int indent = 0 ) const = 0;
     30        virtual BaseSyntaxNode * acceptMutator( Mutator & m ) = 0;
     31        virtual void print( std::ostream & os, int indent = 0 ) const = 0;
    2932};
    3033
  • src/SynTree/Mutator.cc

    ra139c11 r2b7bf59  
    1717#include <list>                // for list
    1818
     19#include "Attribute.h"         // for Attribute
    1920#include "Declaration.h"       // for ObjectDecl, Declaration, DeclarationWi...
    2021#include "Expression.h"        // for Expression, ConstantExpr, ConditionalExpr
     
    3637        objectDecl->set_init( maybeMutate( objectDecl->get_init(), *this ) );
    3738        objectDecl->set_bitfieldWidth( maybeMutate( objectDecl->get_bitfieldWidth(), *this ) );
     39        mutateAll( objectDecl->attributes, *this );
    3840        return objectDecl;
    3941}
     
    4244        functionDecl->set_functionType( maybeMutate( functionDecl->get_functionType(), *this ) );
    4345        functionDecl->set_statements( maybeMutate( functionDecl->get_statements(), *this ) );
     46        mutateAll( functionDecl->attributes, *this );
    4447        return functionDecl;
    4548}
     
    618621}
    619622
     623Attribute * Mutator::mutate( Attribute * attribute ) {
     624        mutateAll( attribute->parameters, *this );
     625        return attribute;
     626}
     627
    620628// Local Variables: //
    621629// tab-width: 4 //
  • src/SynTree/Mutator.h

    ra139c11 r2b7bf59  
    2525        virtual ~Mutator();
    2626  public:
    27         virtual DeclarationWithType* mutate( ObjectDecl *objectDecl );
    28         virtual DeclarationWithType* mutate( FunctionDecl *functionDecl );
    29         virtual Declaration* mutate( StructDecl *aggregateDecl );
    30         virtual Declaration* mutate( UnionDecl *aggregateDecl );
    31         virtual Declaration* mutate( EnumDecl *aggregateDecl );
    32         virtual Declaration* mutate( TraitDecl *aggregateDecl );
    33         virtual Declaration* mutate( TypeDecl *typeDecl );
    34         virtual Declaration* mutate( TypedefDecl *typeDecl );
    35         virtual AsmDecl* mutate( AsmDecl *asmDecl );
     27        virtual DeclarationWithType * mutate( ObjectDecl * objectDecl );
     28        virtual DeclarationWithType * mutate( FunctionDecl * functionDecl );
     29        virtual Declaration * mutate( StructDecl * aggregateDecl );
     30        virtual Declaration * mutate( UnionDecl * aggregateDecl );
     31        virtual Declaration * mutate( EnumDecl * aggregateDecl );
     32        virtual Declaration * mutate( TraitDecl * aggregateDecl );
     33        virtual Declaration * mutate( TypeDecl * typeDecl );
     34        virtual Declaration * mutate( TypedefDecl * typeDecl );
     35        virtual AsmDecl * mutate( AsmDecl * asmDecl );
    3636
    37         virtual CompoundStmt* mutate( CompoundStmt *compoundStmt );
    38         virtual Statement* mutate( ExprStmt *exprStmt );
    39         virtual Statement* mutate( AsmStmt *asmStmt );
    40         virtual Statement* mutate( IfStmt *ifStmt );
    41         virtual Statement* mutate( WhileStmt *whileStmt );
    42         virtual Statement* mutate( ForStmt *forStmt );
    43         virtual Statement* mutate( SwitchStmt *switchStmt );
    44         virtual Statement* mutate( CaseStmt *caseStmt );
    45         virtual Statement* mutate( BranchStmt *branchStmt );
    46         virtual Statement* mutate( ReturnStmt *returnStmt );
    47         virtual Statement* mutate( ThrowStmt *throwStmt );
    48         virtual Statement* mutate( TryStmt *tryStmt );
    49         virtual Statement* mutate( CatchStmt *catchStmt );
    50         virtual Statement* mutate( FinallyStmt *catchStmt );
    51         virtual Statement* mutate( WaitForStmt *waitforStmt );
    52         virtual NullStmt* mutate( NullStmt *nullStmt );
    53         virtual Statement* mutate( DeclStmt *declStmt );
    54         virtual Statement* mutate( ImplicitCtorDtorStmt *impCtorDtorStmt );
     37        virtual CompoundStmt * mutate( CompoundStmt * compoundStmt );
     38        virtual Statement * mutate( ExprStmt * exprStmt );
     39        virtual Statement * mutate( AsmStmt * asmStmt );
     40        virtual Statement * mutate( IfStmt * ifStmt );
     41        virtual Statement * mutate( WhileStmt * whileStmt );
     42        virtual Statement * mutate( ForStmt * forStmt );
     43        virtual Statement * mutate( SwitchStmt * switchStmt );
     44        virtual Statement * mutate( CaseStmt * caseStmt );
     45        virtual Statement * mutate( BranchStmt * branchStmt );
     46        virtual Statement * mutate( ReturnStmt * returnStmt );
     47        virtual Statement * mutate( ThrowStmt * throwStmt );
     48        virtual Statement * mutate( TryStmt * tryStmt );
     49        virtual Statement * mutate( CatchStmt * catchStmt );
     50        virtual Statement * mutate( FinallyStmt * catchStmt );
     51        virtual Statement * mutate( WaitForStmt * waitforStmt );
     52        virtual NullStmt * mutate( NullStmt * nullStmt );
     53        virtual Statement * mutate( DeclStmt * declStmt );
     54        virtual Statement * mutate( ImplicitCtorDtorStmt * impCtorDtorStmt );
    5555
    56         virtual Expression* mutate( ApplicationExpr *applicationExpr );
    57         virtual Expression* mutate( UntypedExpr *untypedExpr );
    58         virtual Expression* mutate( NameExpr *nameExpr );
    59         virtual Expression* mutate( AddressExpr *castExpr );
    60         virtual Expression* mutate( LabelAddressExpr *labAddressExpr );
    61         virtual Expression* mutate( CastExpr *castExpr );
    62         virtual Expression* mutate( VirtualCastExpr *castExpr );
    63         virtual Expression* mutate( UntypedMemberExpr *memberExpr );
    64         virtual Expression* mutate( MemberExpr *memberExpr );
    65         virtual Expression* mutate( VariableExpr *variableExpr );
    66         virtual Expression* mutate( ConstantExpr *constantExpr );
    67         virtual Expression* mutate( SizeofExpr *sizeofExpr );
    68         virtual Expression* mutate( AlignofExpr *alignofExpr );
    69         virtual Expression* mutate( UntypedOffsetofExpr *offsetofExpr );
    70         virtual Expression* mutate( OffsetofExpr *offsetofExpr );
    71         virtual Expression* mutate( OffsetPackExpr *offsetPackExpr );
    72         virtual Expression* mutate( AttrExpr *attrExpr );
    73         virtual Expression* mutate( LogicalExpr *logicalExpr );
    74         virtual Expression* mutate( ConditionalExpr *conditionalExpr );
    75         virtual Expression* mutate( CommaExpr *commaExpr );
    76         virtual Expression* mutate( TypeExpr *typeExpr );
    77         virtual Expression* mutate( AsmExpr *asmExpr );
    78         virtual Expression* mutate( ImplicitCopyCtorExpr *impCpCtorExpr );
    79         virtual Expression* mutate( ConstructorExpr *ctorExpr );
    80         virtual Expression* mutate( CompoundLiteralExpr *compLitExpr );
    81         virtual Expression* mutate( RangeExpr *rangeExpr );
    82         virtual Expression* mutate( UntypedTupleExpr *tupleExpr );
    83         virtual Expression* mutate( TupleExpr *tupleExpr );
    84         virtual Expression* mutate( TupleIndexExpr *tupleExpr );
    85         virtual Expression* mutate( TupleAssignExpr *assignExpr );
    86         virtual Expression* mutate( StmtExpr * stmtExpr );
    87         virtual Expression* mutate( UniqueExpr * uniqueExpr );
    88         virtual Expression* mutate( UntypedInitExpr * initExpr );
    89         virtual Expression* mutate( InitExpr * initExpr );
     56        virtual Expression* mutate( ApplicationExpr * applicationExpr );
     57        virtual Expression* mutate( UntypedExpr * untypedExpr );
     58        virtual Expression* mutate( NameExpr * nameExpr );
     59        virtual Expression* mutate( AddressExpr * castExpr );
     60        virtual Expression* mutate( LabelAddressExpr * labAddressExpr );
     61        virtual Expression* mutate( CastExpr * castExpr );
     62        virtual Expression* mutate( VirtualCastExpr * castExpr );
     63        virtual Expression* mutate( UntypedMemberExpr * memberExpr );
     64        virtual Expression* mutate( MemberExpr * memberExpr );
     65        virtual Expression* mutate( VariableExpr * variableExpr );
     66        virtual Expression* mutate( ConstantExpr * constantExpr );
     67        virtual Expression* mutate( SizeofExpr * sizeofExpr );
     68        virtual Expression* mutate( AlignofExpr * alignofExpr );
     69        virtual Expression* mutate( UntypedOffsetofExpr * offsetofExpr );
     70        virtual Expression* mutate( OffsetofExpr * offsetofExpr );
     71        virtual Expression* mutate( OffsetPackExpr * offsetPackExpr );
     72        virtual Expression* mutate( AttrExpr * attrExpr );
     73        virtual Expression* mutate( LogicalExpr * logicalExpr );
     74        virtual Expression* mutate( ConditionalExpr * conditionalExpr );
     75        virtual Expression* mutate( CommaExpr * commaExpr );
     76        virtual Expression* mutate( TypeExpr * typeExpr );
     77        virtual Expression* mutate( AsmExpr * asmExpr );
     78        virtual Expression* mutate( ImplicitCopyCtorExpr * impCpCtorExpr );
     79        virtual Expression* mutate( ConstructorExpr * ctorExpr );
     80        virtual Expression* mutate( CompoundLiteralExpr * compLitExpr );
     81        virtual Expression* mutate( RangeExpr * rangeExpr );
     82        virtual Expression* mutate( UntypedTupleExpr * tupleExpr );
     83        virtual Expression* mutate( TupleExpr * tupleExpr );
     84        virtual Expression* mutate( TupleIndexExpr * tupleExpr );
     85        virtual Expression* mutate( TupleAssignExpr * assignExpr );
     86        virtual Expression* mutate( StmtExpr  * stmtExpr );
     87        virtual Expression* mutate( UniqueExpr  * uniqueExpr );
     88        virtual Expression* mutate( UntypedInitExpr  * initExpr );
     89        virtual Expression* mutate( InitExpr  * initExpr );
    9090
    91         virtual Type* mutate( VoidType *basicType );
    92         virtual Type* mutate( BasicType *basicType );
    93         virtual Type* mutate( PointerType *pointerType );
    94         virtual Type* mutate( ArrayType *arrayType );
    95         virtual Type* mutate( ReferenceType *refType );
    96         virtual Type* mutate( FunctionType *functionType );
    97         virtual Type* mutate( StructInstType *aggregateUseType );
    98         virtual Type* mutate( UnionInstType *aggregateUseType );
    99         virtual Type* mutate( EnumInstType *aggregateUseType );
    100         virtual Type* mutate( TraitInstType *aggregateUseType );
    101         virtual Type* mutate( TypeInstType *aggregateUseType );
    102         virtual Type* mutate( TupleType *tupleType );
    103         virtual Type* mutate( TypeofType *typeofType );
    104         virtual Type* mutate( AttrType *attrType );
    105         virtual Type* mutate( VarArgsType *varArgsType );
    106         virtual Type* mutate( ZeroType *zeroType );
    107         virtual Type* mutate( OneType *oneType );
     91        virtual Type * mutate( VoidType * basicType );
     92        virtual Type * mutate( BasicType * basicType );
     93        virtual Type * mutate( PointerType * pointerType );
     94        virtual Type * mutate( ArrayType * arrayType );
     95        virtual Type * mutate( ReferenceType * refType );
     96        virtual Type * mutate( FunctionType * functionType );
     97        virtual Type * mutate( StructInstType * aggregateUseType );
     98        virtual Type * mutate( UnionInstType * aggregateUseType );
     99        virtual Type * mutate( EnumInstType * aggregateUseType );
     100        virtual Type * mutate( TraitInstType * aggregateUseType );
     101        virtual Type * mutate( TypeInstType * aggregateUseType );
     102        virtual Type * mutate( TupleType * tupleType );
     103        virtual Type * mutate( TypeofType * typeofType );
     104        virtual Type * mutate( AttrType * attrType );
     105        virtual Type * mutate( VarArgsType * varArgsType );
     106        virtual Type * mutate( ZeroType * zeroType );
     107        virtual Type * mutate( OneType * oneType );
    108108
    109         virtual Designation* mutate( Designation *designation );
    110         virtual Initializer* mutate( SingleInit *singleInit );
    111         virtual Initializer* mutate( ListInit *listInit );
    112         virtual Initializer* mutate( ConstructorInit *ctorInit );
     109        virtual Designation * mutate( Designation * designation );
     110        virtual Initializer * mutate( SingleInit * singleInit );
     111        virtual Initializer * mutate( ListInit * listInit );
     112        virtual Initializer * mutate( ConstructorInit * ctorInit );
    113113
    114         virtual Subrange *mutate( Subrange *subrange );
     114        virtual Subrange * mutate( Subrange * subrange );
    115115
    116         virtual Constant *mutate( Constant *constant );
     116        virtual Constant * mutate( Constant * constant );
     117
     118        virtual Attribute * mutate( Attribute * attribute );
    117119  private:
    118         virtual Declaration* handleAggregateDecl(AggregateDecl *aggregateDecl );
    119         virtual Declaration* handleNamedTypeDecl(NamedTypeDecl *typeDecl );
    120         virtual Type* handleReferenceToType(ReferenceToType *aggregateUseType );
     120        virtual Declaration * handleAggregateDecl(AggregateDecl * aggregateDecl );
     121        virtual Declaration * handleNamedTypeDecl(NamedTypeDecl * typeDecl );
     122        virtual Type * handleReferenceToType(ReferenceToType * aggregateUseType );
    121123};
    122124
  • src/SynTree/Visitor.cc

    ra139c11 r2b7bf59  
    1717#include <list>           // for list
    1818
     19#include "Attribute.h"    // for Attribute
    1920#include "Constant.h"     // for Constant
    2021#include "Declaration.h"  // for DeclarationWithType, ObjectDecl, Declaration
     
    3536        maybeAccept( objectDecl->get_init(), *this );
    3637        maybeAccept( objectDecl->get_bitfieldWidth(), *this );
     38        acceptAll( objectDecl->attributes, *this );
    3739}
    3840
     
    4042        maybeAccept( functionDecl->get_functionType(), *this );
    4143        maybeAccept( functionDecl->get_statements(), *this );
     44        acceptAll( functionDecl->attributes, *this );
    4245}
    4346
     
    487490
    488491
    489 void Visitor::visit( __attribute__((unused)) Subrange *subrange ) {}
    490 
    491 
    492 void Visitor::visit( __attribute__((unused)) Constant *constant ) {}
     492void Visitor::visit( Subrange * ) {}
     493
     494
     495void Visitor::visit( Constant * ) {}
     496
     497void Visitor::visit( Attribute * attribute ) {
     498        acceptAll( attribute->parameters, *this );
     499}
     500
    493501// Local Variables: //
    494502// tab-width: 4 //
  • src/SynTree/Visitor.h

    ra139c11 r2b7bf59  
    2727        // of the given syntax node, but performs no other action.
    2828
    29         virtual void visit( ObjectDecl *objectDecl );
    30         virtual void visit( FunctionDecl *functionDecl );
    31         virtual void visit( StructDecl *aggregateDecl );
    32         virtual void visit( UnionDecl *aggregateDecl );
    33         virtual void visit( EnumDecl *aggregateDecl );
    34         virtual void visit( TraitDecl *aggregateDecl );
    35         virtual void visit( TypeDecl *typeDecl );
    36         virtual void visit( TypedefDecl *typeDecl );
    37         virtual void visit( AsmDecl *asmDecl );
     29        virtual void visit( ObjectDecl * objectDecl );
     30        virtual void visit( FunctionDecl * functionDecl );
     31        virtual void visit( StructDecl * aggregateDecl );
     32        virtual void visit( UnionDecl * aggregateDecl );
     33        virtual void visit( EnumDecl * aggregateDecl );
     34        virtual void visit( TraitDecl * aggregateDecl );
     35        virtual void visit( TypeDecl * typeDecl );
     36        virtual void visit( TypedefDecl * typeDecl );
     37        virtual void visit( AsmDecl * asmDecl );
    3838
    39         virtual void visit( CompoundStmt *compoundStmt );
    40         virtual void visit( ExprStmt *exprStmt );
    41         virtual void visit( AsmStmt *asmStmt );
    42         virtual void visit( IfStmt *ifStmt );
    43         virtual void visit( WhileStmt *whileStmt );
    44         virtual void visit( ForStmt *forStmt );
    45         virtual void visit( SwitchStmt *switchStmt );
    46         virtual void visit( CaseStmt *caseStmt );
    47         virtual void visit( BranchStmt *branchStmt );
    48         virtual void visit( ReturnStmt *returnStmt );
    49         virtual void visit( ThrowStmt *throwStmt );
    50         virtual void visit( TryStmt *tryStmt );
    51         virtual void visit( CatchStmt *catchStmt );
    52         virtual void visit( FinallyStmt *finallyStmt );
    53         virtual void visit( WaitForStmt *waitforStmt );
    54         virtual void visit( NullStmt *nullStmt );
    55         virtual void visit( DeclStmt *declStmt );
    56         virtual void visit( ImplicitCtorDtorStmt *impCtorDtorStmt );
     39        virtual void visit( CompoundStmt * compoundStmt );
     40        virtual void visit( ExprStmt * exprStmt );
     41        virtual void visit( AsmStmt * asmStmt );
     42        virtual void visit( IfStmt * ifStmt );
     43        virtual void visit( WhileStmt * whileStmt );
     44        virtual void visit( ForStmt * forStmt );
     45        virtual void visit( SwitchStmt * switchStmt );
     46        virtual void visit( CaseStmt * caseStmt );
     47        virtual void visit( BranchStmt * branchStmt );
     48        virtual void visit( ReturnStmt * returnStmt );
     49        virtual void visit( ThrowStmt * throwStmt );
     50        virtual void visit( TryStmt * tryStmt );
     51        virtual void visit( CatchStmt * catchStmt );
     52        virtual void visit( FinallyStmt * finallyStmt );
     53        virtual void visit( WaitForStmt * waitforStmt );
     54        virtual void visit( NullStmt * nullStmt );
     55        virtual void visit( DeclStmt * declStmt );
     56        virtual void visit( ImplicitCtorDtorStmt * impCtorDtorStmt );
    5757
    58         virtual void visit( ApplicationExpr *applicationExpr );
    59         virtual void visit( UntypedExpr *untypedExpr );
    60         virtual void visit( NameExpr *nameExpr );
    61         virtual void visit( CastExpr *castExpr );
    62         virtual void visit( VirtualCastExpr *castExpr );
    63         virtual void visit( AddressExpr *addressExpr );
    64         virtual void visit( LabelAddressExpr *labAddressExpr );
    65         virtual void visit( UntypedMemberExpr *memberExpr );
    66         virtual void visit( MemberExpr *memberExpr );
    67         virtual void visit( VariableExpr *variableExpr );
    68         virtual void visit( ConstantExpr *constantExpr );
    69         virtual void visit( SizeofExpr *sizeofExpr );
    70         virtual void visit( AlignofExpr *alignofExpr );
    71         virtual void visit( UntypedOffsetofExpr *offsetofExpr );
    72         virtual void visit( OffsetofExpr *offsetofExpr );
    73         virtual void visit( OffsetPackExpr *offsetPackExpr );
    74         virtual void visit( AttrExpr *attrExpr );
    75         virtual void visit( LogicalExpr *logicalExpr );
    76         virtual void visit( ConditionalExpr *conditionalExpr );
    77         virtual void visit( CommaExpr *commaExpr );
    78         virtual void visit( TypeExpr *typeExpr );
    79         virtual void visit( AsmExpr *asmExpr );
    80         virtual void visit( ImplicitCopyCtorExpr *impCpCtorExpr );
    81         virtual void visit( ConstructorExpr * ctorExpr );
    82         virtual void visit( CompoundLiteralExpr *compLitExpr );
    83         virtual void visit( RangeExpr *rangeExpr );
    84         virtual void visit( UntypedTupleExpr *tupleExpr );
    85         virtual void visit( TupleExpr *tupleExpr );
    86         virtual void visit( TupleIndexExpr *tupleExpr );
    87         virtual void visit( TupleAssignExpr *assignExpr );
    88         virtual void visit( StmtExpr * stmtExpr );
    89         virtual void visit( UniqueExpr * uniqueExpr );
    90         virtual void visit( UntypedInitExpr * initExpr );
    91         virtual void visit( InitExpr * initExpr );
     58        virtual void visit( ApplicationExpr * applicationExpr );
     59        virtual void visit( UntypedExpr * untypedExpr );
     60        virtual void visit( NameExpr * nameExpr );
     61        virtual void visit( CastExpr * castExpr );
     62        virtual void visit( VirtualCastExpr * castExpr );
     63        virtual void visit( AddressExpr * addressExpr );
     64        virtual void visit( LabelAddressExpr * labAddressExpr );
     65        virtual void visit( UntypedMemberExpr * memberExpr );
     66        virtual void visit( MemberExpr * memberExpr );
     67        virtual void visit( VariableExpr * variableExpr );
     68        virtual void visit( ConstantExpr * constantExpr );
     69        virtual void visit( SizeofExpr * sizeofExpr );
     70        virtual void visit( AlignofExpr * alignofExpr );
     71        virtual void visit( UntypedOffsetofExpr * offsetofExpr );
     72        virtual void visit( OffsetofExpr * offsetofExpr );
     73        virtual void visit( OffsetPackExpr * offsetPackExpr );
     74        virtual void visit( AttrExpr * attrExpr );
     75        virtual void visit( LogicalExpr * logicalExpr );
     76        virtual void visit( ConditionalExpr * conditionalExpr );
     77        virtual void visit( CommaExpr * commaExpr );
     78        virtual void visit( TypeExpr * typeExpr );
     79        virtual void visit( AsmExpr * asmExpr );
     80        virtual void visit( ImplicitCopyCtorExpr * impCpCtorExpr );
     81        virtual void visit( ConstructorExpr *  ctorExpr );
     82        virtual void visit( CompoundLiteralExpr * compLitExpr );
     83        virtual void visit( RangeExpr * rangeExpr );
     84        virtual void visit( UntypedTupleExpr * tupleExpr );
     85        virtual void visit( TupleExpr * tupleExpr );
     86        virtual void visit( TupleIndexExpr * tupleExpr );
     87        virtual void visit( TupleAssignExpr * assignExpr );
     88        virtual void visit( StmtExpr *  stmtExpr );
     89        virtual void visit( UniqueExpr *  uniqueExpr );
     90        virtual void visit( UntypedInitExpr *  initExpr );
     91        virtual void visit( InitExpr *  initExpr );
    9292
    93         virtual void visit( VoidType *basicType );
    94         virtual void visit( BasicType *basicType );
    95         virtual void visit( PointerType *pointerType );
    96         virtual void visit( ArrayType *arrayType );
    97         virtual void visit( ReferenceType *refType );
    98         virtual void visit( FunctionType *functionType );
    99         virtual void visit( StructInstType *aggregateUseType );
    100         virtual void visit( UnionInstType *aggregateUseType );
    101         virtual void visit( EnumInstType *aggregateUseType );
    102         virtual void visit( TraitInstType *aggregateUseType );
    103         virtual void visit( TypeInstType *aggregateUseType );
    104         virtual void visit( TupleType *tupleType );
    105         virtual void visit( TypeofType *typeofType );
    106         virtual void visit( AttrType *attrType );
    107         virtual void visit( VarArgsType *varArgsType );
    108         virtual void visit( ZeroType *zeroType );
    109         virtual void visit( OneType *oneType );
     93        virtual void visit( VoidType * basicType );
     94        virtual void visit( BasicType * basicType );
     95        virtual void visit( PointerType * pointerType );
     96        virtual void visit( ArrayType * arrayType );
     97        virtual void visit( ReferenceType * refType );
     98        virtual void visit( FunctionType * functionType );
     99        virtual void visit( StructInstType * aggregateUseType );
     100        virtual void visit( UnionInstType * aggregateUseType );
     101        virtual void visit( EnumInstType * aggregateUseType );
     102        virtual void visit( TraitInstType * aggregateUseType );
     103        virtual void visit( TypeInstType * aggregateUseType );
     104        virtual void visit( TupleType * tupleType );
     105        virtual void visit( TypeofType * typeofType );
     106        virtual void visit( AttrType * attrType );
     107        virtual void visit( VarArgsType * varArgsType );
     108        virtual void visit( ZeroType * zeroType );
     109        virtual void visit( OneType * oneType );
    110110
    111         virtual void visit( Designation *designation );
    112         virtual void visit( SingleInit *singleInit );
    113         virtual void visit( ListInit *listInit );
    114         virtual void visit( ConstructorInit *ctorInit );
     111        virtual void visit( Designation * designation );
     112        virtual void visit( SingleInit * singleInit );
     113        virtual void visit( ListInit * listInit );
     114        virtual void visit( ConstructorInit * ctorInit );
    115115
    116         virtual void visit( Subrange *subrange );
     116        virtual void visit( Subrange * subrange );
    117117
    118         virtual void visit( Constant *constant );
     118        virtual void visit( Constant * constant );
     119
     120        virtual void visit( Attribute * attribute );
    119121  private:
    120122        virtual void handleAggregateDecl( AggregateDecl *aggregateDecl );
Note: See TracChangeset for help on using the changeset viewer.