Changeset 63be3387 for src/SynTree


Ignore:
Timestamp:
Nov 14, 2022, 11:52:44 AM (3 years ago)
Author:
caparson <caparson@…>
Branches:
ADT, ast-experimental, master
Children:
7d9598d8
Parents:
b77f0e1 (diff), 19a8c40 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge branch 'master' of plg.uwaterloo.ca:software/cfa/cfa-cc

Location:
src/SynTree
Files:
1 added
5 edited

Legend:

Unmodified
Added
Removed
  • src/SynTree/Declaration.h

    rb77f0e1 r63be3387  
    449449};
    450450
     451
     452class InlineMemberDecl : public DeclarationWithType {
     453        typedef DeclarationWithType Parent;
     454  public:
     455        Type * type;
     456
     457        InlineMemberDecl( const std::string & name, Type::StorageClasses scs, LinkageSpec::Spec linkage, Type * type,
     458                                const std::list< Attribute * > attributes = std::list< Attribute * >(), Type::FuncSpecifiers fs = Type::FuncSpecifiers() );
     459        InlineMemberDecl( const InlineMemberDecl & other );
     460        virtual ~InlineMemberDecl();
     461
     462        virtual Type * get_type() const override { return type; }
     463        virtual void set_type(Type * newType) override { type = newType; }
     464
     465        static InlineMemberDecl * newInlineMemberDecl( const std::string & name, Type * type );
     466
     467        virtual InlineMemberDecl * clone() const override { return new InlineMemberDecl( *this ); }
     468        virtual void accept( Visitor & v ) override { v.visit( this ); }
     469        virtual void accept( Visitor & v ) const override { v.visit( this ); }
     470        virtual DeclarationWithType * acceptMutator( Mutator & m )  override { return m.mutate( this ); }
     471        virtual void print( std::ostream & os, Indenter indent = {} ) const override;
     472        virtual void printShort( std::ostream & os, Indenter indent = {} ) const override;
     473
     474};
     475
    451476std::ostream & operator<<( std::ostream & os, const TypeDecl::Data & data );
    452477
  • src/SynTree/Mutator.h

    rb77f0e1 r63be3387  
    3636        virtual DirectiveDecl * mutate( DirectiveDecl * directiveDecl ) = 0;
    3737        virtual StaticAssertDecl * mutate( StaticAssertDecl * assertDecl ) = 0;
     38        virtual DeclarationWithType * mutate( InlineMemberDecl * InlineMemberDecl ) = 0;
    3839
    3940        virtual CompoundStmt * mutate( CompoundStmt * compoundStmt ) = 0;
  • src/SynTree/SynTree.h

    rb77f0e1 r63be3387  
    3838class DirectiveDecl;
    3939class StaticAssertDecl;
     40class InlineMemberDecl;
    4041
    4142class Statement;
  • src/SynTree/Visitor.h

    rb77f0e1 r63be3387  
    4949        virtual void visit( StaticAssertDecl * node ) { visit( const_cast<const StaticAssertDecl *>(node) ); }
    5050        virtual void visit( const StaticAssertDecl * assertDecl ) = 0;
     51        virtual void visit( InlineMemberDecl * node ) { visit( const_cast<const InlineMemberDecl *>(node) ); }
     52        virtual void visit( const InlineMemberDecl * valueDecl ) = 0;
    5153
    5254        virtual void visit( CompoundStmt * node ) { visit( const_cast<const CompoundStmt *>(node) ); }
  • src/SynTree/module.mk

    rb77f0e1 r63be3387  
    4242      SynTree/Initializer.cc \
    4343      SynTree/Initializer.h \
     44      SynTree/InlineMemberDecl.cc \
    4445      SynTree/Label.h \
    4546      SynTree/LinkageSpec.cc \
Note: See TracChangeset for help on using the changeset viewer.