Changeset 1b7b604


Ignore:
Timestamp:
Feb 14, 2023, 9:19:11 PM (22 months ago)
Author:
Peter A. Buhr <pabuhr@…>
Branches:
ADT, ast-experimental, master
Children:
531c3d5
Parents:
07e3652
Message:

formatting

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/SynTree/Type.h

    r07e3652 r1b7b604  
    99// Author           : Richard C. Bilson
    1010// Created On       : Mon May 18 07:44:20 2015
    11 // Last Modified By : Andrew Beach
    12 // Last Modified On : Wed Jul 14 15:40:00 2021
    13 // Update Count     : 171
     11// Last Modified By : Peter A. Buhr
     12// Last Modified On : Mon Feb 13 17:13:52 2023
     13// Update Count     : 173
    1414//
    1515
     
    189189        virtual TypeSubstitution genericSubstitution() const;
    190190
    191         virtual Type *clone() const = 0;
     191        virtual Type * clone() const = 0;
    192192        virtual void accept( Visitor & v ) = 0;
    193193        virtual void accept( Visitor & v ) const = 0;
    194         virtual Type *acceptMutator( Mutator & m ) = 0;
     194        virtual Type * acceptMutator( Mutator & m ) = 0;
    195195        virtual void print( std::ostream & os, Indenter indent = {} ) const;
    196196};
     
    207207        virtual bool isComplete() const override { return false; }
    208208
    209         virtual VoidType *clone() const override { return new VoidType( *this ); }
    210         virtual void accept( Visitor & v ) override { v.visit( this ); }
    211         virtual void accept( Visitor & v ) const override { v.visit( this ); }
    212         virtual Type *acceptMutator( Mutator & m ) override { return m.mutate( this ); }
     209        virtual VoidType * clone() const override { return new VoidType( *this ); }
     210        virtual void accept( Visitor & v ) override { v.visit( this ); }
     211        virtual void accept( Visitor & v ) const override { v.visit( this ); }
     212        virtual Type * acceptMutator( Mutator & m ) override { return m.mutate( this ); }
    213213        virtual void print( std::ostream & os, Indenter indent = {} ) const override;
    214214};
     
    259259        // GENERATED END
    260260
    261         static const char *typeNames[];                                         // string names for basic types, MUST MATCH with Kind
     261        static const char * typeNames[];                                        // string names for basic types, MUST MATCH with Kind
    262262
    263263        BasicType( const Type::Qualifiers & tq, Kind bt, const std::list< Attribute * > & attributes = std::list< Attribute * >() );
     
    266266        void set_kind( Kind newValue ) { kind = newValue; }
    267267
    268         virtual BasicType *clone() const override { return new BasicType( *this ); }
    269         virtual void accept( Visitor & v ) override { v.visit( this ); }
    270         virtual void accept( Visitor & v ) const override { v.visit( this ); }
    271         virtual Type *acceptMutator( Mutator & m ) override { return m.mutate( this ); }
     268        virtual BasicType * clone() const override { return new BasicType( *this ); }
     269        virtual void accept( Visitor & v ) override { v.visit( this ); }
     270        virtual void accept( Visitor & v ) const override { v.visit( this ); }
     271        virtual Type * acceptMutator( Mutator & m ) override { return m.mutate( this ); }
    272272        virtual void print( std::ostream & os, Indenter indent = {} ) const override;
    273273        bool isInteger() const;
     
    279279
    280280        // In C99, pointer types can be qualified in many ways e.g., int f( int a[ static 3 ] )
    281         Expression *dimension;
     281        Expression * dimension;
    282282        bool isVarLen;
    283283        bool isStatic;
    284284
    285         PointerType( const Type::Qualifiers & tq, Type *base, const std::list< Attribute * > & attributes = std::list< Attribute * >() );
    286         PointerType( const Type::Qualifiers & tq, Type *base, Expression *dimension, bool isVarLen, bool isStatic, const std::list< Attribute * > & attributes = std::list< Attribute * >() );
     285        PointerType( const Type::Qualifiers & tq, Type * base, const std::list< Attribute * > & attributes = std::list< Attribute * >() );
     286        PointerType( const Type::Qualifiers & tq, Type * base, Expression * dimension, bool isVarLen, bool isStatic, const std::list< Attribute * > & attributes = std::list< Attribute * >() );
    287287        PointerType( const PointerType& );
    288288        virtual ~PointerType();
    289289
    290         Type *get_base() { return base; }
    291         void set_base( Type *newValue ) { base = newValue; }
    292         Expression *get_dimension() { return dimension; }
    293         void set_dimension( Expression *newValue ) { dimension = newValue; }
     290        Type * get_base() { return base; }
     291        void set_base( Type * newValue ) { base = newValue; }
     292        Expression * get_dimension() { return dimension; }
     293        void set_dimension( Expression * newValue ) { dimension = newValue; }
    294294        bool get_isVarLen() { return isVarLen; }
    295295        void set_isVarLen( bool newValue ) { isVarLen = newValue; }
     
    301301        virtual bool isComplete() const override { return ! isVarLen; }
    302302
    303         virtual PointerType *clone() const override { return new PointerType( *this ); }
    304         virtual void accept( Visitor & v ) override { v.visit( this ); }
    305         virtual void accept( Visitor & v ) const override { v.visit( this ); }
    306         virtual Type *acceptMutator( Mutator & m ) override { return m.mutate( this ); }
     303        virtual PointerType * clone() const override { return new PointerType( * this ); }
     304        virtual void accept( Visitor & v ) override { v.visit( this ); }
     305        virtual void accept( Visitor & v ) const override { v.visit( this ); }
     306        virtual Type * acceptMutator( Mutator & m ) override { return m.mutate( this ); }
    307307        virtual void print( std::ostream & os, Indenter indent = {} ) const override;
    308308};
     
    310310class ArrayType : public Type {
    311311  public:
    312         Type *base;
    313         Expression *dimension;
     312        Type * base;
     313        Expression * dimension;
    314314        bool isVarLen;
    315315        bool isStatic;
    316316
    317         ArrayType( const Type::Qualifiers & tq, Type *base, Expression *dimension, bool isVarLen, bool isStatic, const std::list< Attribute * > & attributes = std::list< Attribute * >() );
     317        ArrayType( const Type::Qualifiers & tq, Type * base, Expression * dimension, bool isVarLen, bool isStatic, const std::list< Attribute * > & attributes = std::list< Attribute * >() );
    318318        ArrayType( const ArrayType& );
    319319        virtual ~ArrayType();
    320320
    321         Type *get_base() { return base; }
    322         void set_base( Type *newValue ) { base = newValue; }
    323         Expression *get_dimension() { return dimension; }
    324         void set_dimension( Expression *newValue ) { dimension = newValue; }
     321        Type * get_base() { return base; }
     322        void set_base( Type * newValue ) { base = newValue; }
     323        Expression * get_dimension() { return dimension; }
     324        void set_dimension( Expression * newValue ) { dimension = newValue; }
    325325        bool get_isVarLen() { return isVarLen; }
    326326        void set_isVarLen( bool newValue ) { isVarLen = newValue; }
     
    333333        virtual bool isComplete() const override { return dimension || isVarLen; }
    334334
    335         virtual ArrayType *clone() const override { return new ArrayType( *this ); }
    336         virtual void accept( Visitor & v ) override { v.visit( this ); }
    337         virtual void accept( Visitor & v ) const override { v.visit( this ); }
    338         virtual Type *acceptMutator( Mutator & m ) override { return m.mutate( this ); }
     335        virtual ArrayType * clone() const override { return new ArrayType( *this ); }
     336        virtual void accept( Visitor & v ) override { v.visit( this ); }
     337        virtual void accept( Visitor & v ) const override { v.visit( this ); }
     338        virtual Type * acceptMutator( Mutator & m ) override { return m.mutate( this ); }
    339339        virtual void print( std::ostream & os, Indenter indent = {} ) const override;
    340340};
     
    348348        virtual ~QualifiedType();
    349349
    350         virtual QualifiedType *clone() const override { return new QualifiedType( *this ); }
    351         virtual void accept( Visitor & v ) override { v.visit( this ); }
    352         virtual void accept( Visitor & v ) const override { v.visit( this ); }
    353         virtual Type *acceptMutator( Mutator & m ) override { return m.mutate( this ); }
     350        virtual QualifiedType * clone() const override { return new QualifiedType( *this ); }
     351        virtual void accept( Visitor & v ) override { v.visit( this ); }
     352        virtual void accept( Visitor & v ) const override { v.visit( this ); }
     353        virtual Type * acceptMutator( Mutator & m ) override { return m.mutate( this ); }
    354354        virtual void print( std::ostream & os, Indenter indent = {} ) const override;
    355355};
     
    357357class ReferenceType : public Type {
    358358public:
    359         Type *base;
    360 
    361         ReferenceType( const Type::Qualifiers & tq, Type *base, const std::list< Attribute * > & attributes = std::list< Attribute * >() );
     359        Type * base;
     360
     361        ReferenceType( const Type::Qualifiers & tq, Type * base, const std::list< Attribute * > & attributes = std::list< Attribute * >() );
    362362        ReferenceType( const ReferenceType & );
    363363        virtual ~ReferenceType();
    364364
    365         Type *get_base() { return base; }
    366         void set_base( Type *newValue ) { base = newValue; }
     365        Type * get_base() { return base; }
     366        void set_base( Type * newValue ) { base = newValue; }
    367367
    368368        virtual int referenceDepth() const override;
     
    375375        virtual TypeSubstitution genericSubstitution() const override;
    376376
    377         virtual ReferenceType *clone() const override { return new ReferenceType( *this ); }
    378         virtual void accept( Visitor & v ) override { v.visit( this ); }
    379         virtual void accept( Visitor & v ) const override { v.visit( this ); }
    380         virtual Type *acceptMutator( Mutator & m ) override { return m.mutate( this ); }
     377        virtual ReferenceType * clone() const override { return new ReferenceType( *this ); }
     378        virtual void accept( Visitor & v ) override { v.visit( this ); }
     379        virtual void accept( Visitor & v ) const override { v.visit( this ); }
     380        virtual Type * acceptMutator( Mutator & m ) override { return m.mutate( this ); }
    381381        virtual void print( std::ostream & os, Indenter indent = {} ) const override;
    382382};
     
    405405        bool isUnprototyped() const { return isVarArgs && parameters.size() == 0; }
    406406
    407         virtual FunctionType *clone() const override { return new FunctionType( *this ); }
    408         virtual void accept( Visitor & v ) override { v.visit( this ); }
    409         virtual void accept( Visitor & v ) const override { v.visit( this ); }
    410         virtual Type *acceptMutator( Mutator & m ) override { return m.mutate( this ); }
     407        virtual FunctionType * clone() const override { return new FunctionType( *this ); }
     408        virtual void accept( Visitor & v ) override { v.visit( this ); }
     409        virtual void accept( Visitor & v ) const override { v.visit( this ); }
     410        virtual Type * acceptMutator( Mutator & m ) override { return m.mutate( this ); }
    411411        virtual void print( std::ostream & os, Indenter indent = {} ) const override;
    412412};
     
    414414class ReferenceToType : public Type {
    415415  public:
    416         std::list< Expression* > parameters;
     416        std::list< Expression * > parameters;
    417417        std::string name;
    418418        bool hoistType;
     
    428428        void set_hoistType( bool newValue ) { hoistType = newValue; }
    429429
    430         virtual ReferenceToType *clone() const override = 0;
     430        virtual ReferenceToType * clone() const override = 0;
    431431        virtual void accept( Visitor & v ) override = 0;
    432         virtual Type *acceptMutator( Mutator & m ) override = 0;
     432        virtual Type * acceptMutator( Mutator & m ) override = 0;
    433433        virtual void print( std::ostream & os, Indenter indent = {} ) const override;
    434434
     
    443443        // this decl is not "owned" by the struct inst; it is merely a pointer to elsewhere in the tree,
    444444        // where the structure used in this type is actually defined
    445         StructDecl *baseStruct;
     445        StructDecl * baseStruct;
    446446
    447447        StructInstType( const Type::Qualifiers & tq, const std::string & name, const std::list< Attribute * > & attributes = std::list< Attribute * >()  ) : Parent( tq, name, attributes ), baseStruct( 0 ) {}
     
    449449        StructInstType( const StructInstType & other ) : Parent( other ), baseStruct( other.baseStruct ) {}
    450450
    451         StructDecl *get_baseStruct() const { return baseStruct; }
    452         void set_baseStruct( StructDecl *newValue ) { baseStruct = newValue; }
     451        StructDecl * get_baseStruct() const { return baseStruct; }
     452        void set_baseStruct( StructDecl * newValue ) { baseStruct = newValue; }
    453453
    454454        /// Accesses generic parameters of base struct (NULL if none such)
     
    466466        void lookup( const std::string & name, std::list< Declaration* > & foundDecls ) const override;
    467467
    468         virtual StructInstType *clone() const override { return new StructInstType( *this ); }
    469         virtual void accept( Visitor & v ) override { v.visit( this ); }
    470         virtual void accept( Visitor & v ) const override { v.visit( this ); }
    471         virtual Type *acceptMutator( Mutator & m ) override { return m.mutate( this ); }
     468        virtual StructInstType * clone() const override { return new StructInstType( *this ); }
     469        virtual void accept( Visitor & v ) override { v.visit( this ); }
     470        virtual void accept( Visitor & v ) const override { v.visit( this ); }
     471        virtual Type * acceptMutator( Mutator & m ) override { return m.mutate( this ); }
    472472
    473473        virtual void print( std::ostream & os, Indenter indent = {} ) const override;
     
    481481        // this decl is not "owned" by the union inst; it is merely a pointer to elsewhere in the tree,
    482482        // where the union used in this type is actually defined
    483         UnionDecl *baseUnion;
     483        UnionDecl * baseUnion;
    484484
    485485        UnionInstType( const Type::Qualifiers & tq, const std::string & name, const std::list< Attribute * > & attributes = std::list< Attribute * >()  ) : Parent( tq, name, attributes ), baseUnion( 0 ) {}
     
    487487        UnionInstType( const UnionInstType & other ) : Parent( other ), baseUnion( other.baseUnion ) {}
    488488
    489         UnionDecl *get_baseUnion() const { return baseUnion; }
     489        UnionDecl * get_baseUnion() const { return baseUnion; }
    490490        void set_baseUnion( UnionDecl * newValue ) { baseUnion = newValue; }
    491491
     
    504504        void lookup( const std::string & name, std::list< Declaration* > & foundDecls ) const override;
    505505
    506         virtual UnionInstType *clone() const override { return new UnionInstType( *this ); }
    507         virtual void accept( Visitor & v ) override { v.visit( this ); }
    508         virtual void accept( Visitor & v ) const override { v.visit( this ); }
    509         virtual Type *acceptMutator( Mutator & m ) override { return m.mutate( this ); }
     506        virtual UnionInstType * clone() const override { return new UnionInstType( *this ); }
     507        virtual void accept( Visitor & v ) override { v.visit( this ); }
     508        virtual void accept( Visitor & v ) const override { v.visit( this ); }
     509        virtual Type * acceptMutator( Mutator & m ) override { return m.mutate( this ); }
    510510
    511511        virtual void print( std::ostream & os, Indenter indent = {} ) const override;
     
    519519        // this decl is not "owned" by the enum inst; it is merely a pointer to elsewhere in the tree,
    520520        // where the enum used in this type is actually defined
    521         EnumDecl *baseEnum = nullptr;
     521        EnumDecl * baseEnum = nullptr;
    522522
    523523        EnumInstType( const Type::Qualifiers & tq, const std::string & name, const std::list< Attribute * > & attributes = std::list< Attribute * >()  ) : Parent( tq, name, attributes ) {}
     
    525525        EnumInstType( const EnumInstType & other ) : Parent( other ), baseEnum( other.baseEnum ) {}
    526526
    527         EnumDecl *get_baseEnum() const { return baseEnum; }
    528         void set_baseEnum( EnumDecl *newValue ) { baseEnum = newValue; }
     527        EnumDecl * get_baseEnum() const { return baseEnum; }
     528        void set_baseEnum( EnumDecl * newValue ) { baseEnum = newValue; }
    529529
    530530        virtual bool isComplete() const override;
     
    532532        virtual AggregateDecl * getAggr() const override;
    533533
    534         virtual EnumInstType *clone() const override { return new EnumInstType( *this ); }
    535         virtual void accept( Visitor & v ) override { v.visit( this ); }
    536         virtual void accept( Visitor & v ) const override { v.visit( this ); }
    537         virtual Type *acceptMutator( Mutator & m ) override { return m.mutate( this ); }
     534        virtual EnumInstType * clone() const override { return new EnumInstType( *this ); }
     535        virtual void accept( Visitor & v ) override { v.visit( this ); }
     536        virtual void accept( Visitor & v ) const override { v.visit( this ); }
     537        virtual Type * acceptMutator( Mutator & m ) override { return m.mutate( this ); }
    538538
    539539        virtual void print( std::ostream & os, Indenter indent = {} ) const override;
     
    556556        virtual bool isComplete() const override;
    557557
    558         virtual TraitInstType *clone() const override { return new TraitInstType( *this ); }
    559         virtual void accept( Visitor & v ) override { v.visit( this ); }
    560         virtual void accept( Visitor & v ) const override { v.visit( this ); }
    561         virtual Type *acceptMutator( Mutator & m ) override { return m.mutate( this ); }
     558        virtual TraitInstType * clone() const override { return new TraitInstType( *this ); }
     559        virtual void accept( Visitor & v ) override { v.visit( this ); }
     560        virtual void accept( Visitor & v ) const override { v.visit( this ); }
     561        virtual Type * acceptMutator( Mutator & m ) override { return m.mutate( this ); }
    562562  private:
    563563        virtual std::string typeString() const override;
     
    569569        // this decl is not "owned" by the type inst; it is merely a pointer to elsewhere in the tree,
    570570        // where the type used here is actually defined
    571         TypeDecl *baseType;
     571        TypeDecl * baseType;
    572572        bool isFtype;
    573573
    574         TypeInstType( const Type::Qualifiers & tq, const std::string & name, TypeDecl *baseType, const std::list< Attribute * > & attributes = std::list< Attribute * >()  );
     574        TypeInstType( const Type::Qualifiers & tq, const std::string & name, TypeDecl * baseType, const std::list< Attribute * > & attributes = std::list< Attribute * >()  );
    575575        TypeInstType( const Type::Qualifiers & tq, const std::string & name, bool isFtype, const std::list< Attribute * > & attributes = std::list< Attribute * >()  );
    576576        TypeInstType( const TypeInstType & other );
    577577        ~TypeInstType();
    578578
    579         TypeDecl *get_baseType() const { return baseType; }
    580         void set_baseType( TypeDecl *newValue );
     579        TypeDecl * get_baseType() const { return baseType; }
     580        void set_baseType( TypeDecl * newValue );
    581581        bool get_isFtype() const { return isFtype; }
    582582        void set_isFtype( bool newValue ) { isFtype = newValue; }
     
    584584        virtual bool isComplete() const override;
    585585
    586         virtual TypeInstType *clone() const override { return new TypeInstType( *this ); }
    587         virtual void accept( Visitor & v ) override { v.visit( this ); }
    588         virtual void accept( Visitor & v ) const override { v.visit( this ); }
    589         virtual Type *acceptMutator( Mutator & m ) override { return m.mutate( this ); }
     586        virtual TypeInstType * clone() const override { return new TypeInstType( *this ); }
     587        virtual void accept( Visitor & v ) override { v.visit( this ); }
     588        virtual void accept( Visitor & v ) const override { v.visit( this ); }
     589        virtual Type * acceptMutator( Mutator & m ) override { return m.mutate( this ); }
    590590        virtual void print( std::ostream & os, Indenter indent = {} ) const override;
    591591  private:
     
    622622        // virtual bool isComplete() const override { return true; } // xxx - not sure if this is right, might need to recursively check complete-ness
    623623
    624         virtual TupleType *clone() const override { return new TupleType( *this ); }
    625         virtual void accept( Visitor & v ) override { v.visit( this ); }
    626         virtual void accept( Visitor & v ) const override { v.visit( this ); }
    627         virtual Type *acceptMutator( Mutator & m ) override { return m.mutate( this ); }
     624        virtual TupleType * clone() const override { return new TupleType( *this ); }
     625        virtual void accept( Visitor & v ) override { v.visit( this ); }
     626        virtual void accept( Visitor & v ) const override { v.visit( this ); }
     627        virtual Type * acceptMutator( Mutator & m ) override { return m.mutate( this ); }
    628628        virtual void print( std::ostream & os, Indenter indent = {} ) const override;
    629629};
     
    631631class TypeofType : public Type {
    632632  public:
    633         Expression *expr;    ///< expression to take the type of
     633        Expression * expr;    ///< expression to take the type of
    634634        bool is_basetypeof;  ///< true iff is basetypeof type
    635635
    636         TypeofType( const Type::Qualifiers & tq, Expression *expr, const std::list< Attribute * > & attributes = std::list< Attribute * >() );
    637         TypeofType( const Type::Qualifiers & tq, Expression *expr, bool is_basetypeof,
     636        TypeofType( const Type::Qualifiers & tq, Expression * expr, const std::list< Attribute * > & attributes = std::list< Attribute * >() );
     637        TypeofType( const Type::Qualifiers & tq, Expression * expr, bool is_basetypeof,
    638638                const std::list< Attribute * > & attributes = std::list< Attribute * >() );
    639639        TypeofType( const TypeofType& );
    640640        virtual ~TypeofType();
    641641
    642         Expression *get_expr() const { return expr; }
    643         void set_expr( Expression *newValue ) { expr = newValue; }
     642        Expression * get_expr() const { return expr; }
     643        void set_expr( Expression * newValue ) { expr = newValue; }
    644644
    645645        virtual bool isComplete() const override { assert( false ); return false; }
    646646
    647         virtual TypeofType *clone() const override { return new TypeofType( *this ); }
    648         virtual void accept( Visitor & v ) override { v.visit( this ); }
    649         virtual void accept( Visitor & v ) const override { v.visit( this ); }
    650         virtual Type *acceptMutator( Mutator & m ) override { return m.mutate( this ); }
     647        virtual TypeofType * clone() const override { return new TypeofType( *this ); }
     648        virtual void accept( Visitor & v ) override { v.visit( this ); }
     649        virtual void accept( Visitor & v ) const override { v.visit( this ); }
     650        virtual Type * acceptMutator( Mutator & m ) override { return m.mutate( this ); }
    651651        virtual void print( std::ostream & os, Indenter indent = {} ) const override;
    652652};
     
    654654class VTableType : public Type {
    655655public:
    656         Type *base;
    657 
    658         VTableType( const Type::Qualifiers & tq, Type *base,
     656        Type * base;
     657
     658        VTableType( const Type::Qualifiers & tq, Type * base,
    659659                const std::list< Attribute * > & attributes = std::list< Attribute * >() );
    660660        VTableType( const VTableType & );
    661661        virtual ~VTableType();
    662662
    663         Type *get_base() { return base; }
    664         void set_base( Type *newValue ) { base = newValue; }
    665 
    666         virtual VTableType *clone() const override { return new VTableType( *this ); }
    667         virtual void accept( Visitor & v ) override { v.visit( this ); }
    668         virtual void accept( Visitor & v ) const override { v.visit( this ); }
    669         virtual Type *acceptMutator( Mutator & m ) override { return m.mutate( this ); }
     663        Type * get_base() { return base; }
     664        void set_base( Type * newValue ) { base = newValue; }
     665
     666        virtual VTableType * clone() const override { return new VTableType( *this ); }
     667        virtual void accept( Visitor & v ) override { v.visit( this ); }
     668        virtual void accept( Visitor & v ) const override { v.visit( this ); }
     669        virtual Type * acceptMutator( Mutator & m ) override { return m.mutate( this ); }
    670670        virtual void print( std::ostream & os, Indenter indent = {} ) const override;
    671671};
     
    674674  public:
    675675        std::string name;
    676         Expression *expr;
    677         Type *type;
     676        Expression * expr;
     677        Type * type;
    678678        bool isType;
    679679
    680         AttrType( const Type::Qualifiers & tq, const std::string & name, Expression *expr, const std::list< Attribute * > & attributes = std::list< Attribute * >() );
    681         AttrType( const Type::Qualifiers & tq, const std::string & name, Type *type, const std::list< Attribute * > & attributes = std::list< Attribute * >()  );
     680        AttrType( const Type::Qualifiers & tq, const std::string & name, Expression * expr, const std::list< Attribute * > & attributes = std::list< Attribute * >() );
     681        AttrType( const Type::Qualifiers & tq, const std::string & name, Type * type, const std::list< Attribute * > & attributes = std::list< Attribute * >()  );
    682682        AttrType( const AttrType& );
    683683        virtual ~AttrType();
     
    685685        const std::string & get_name() const { return name; }
    686686        void set_name( const std::string & newValue ) { name = newValue; }
    687         Expression *get_expr() const { return expr; }
    688         void set_expr( Expression *newValue ) { expr = newValue; }
    689         Type *get_type() const { return type; }
    690         void set_type( Type *newValue ) { type = newValue; }
     687        Expression * get_expr() const { return expr; }
     688        void set_expr( Expression * newValue ) { expr = newValue; }
     689        Type * get_type() const { return type; }
     690        void set_type( Type * newValue ) { type = newValue; }
    691691        bool get_isType() const { return isType; }
    692692        void set_isType( bool newValue ) { isType = newValue; }
     
    694694        virtual bool isComplete() const override { assert( false ); } // xxx - not sure what to do here
    695695
    696         virtual AttrType *clone() const override { return new AttrType( *this ); }
    697         virtual void accept( Visitor & v ) override { v.visit( this ); }
    698         virtual void accept( Visitor & v ) const override { v.visit( this ); }
    699         virtual Type *acceptMutator( Mutator & m ) override { return m.mutate( this ); }
     696        virtual AttrType * clone() const override { return new AttrType( *this ); }
     697        virtual void accept( Visitor & v ) override { v.visit( this ); }
     698        virtual void accept( Visitor & v ) const override { v.visit( this ); }
     699        virtual Type * acceptMutator( Mutator & m ) override { return m.mutate( this ); }
    700700        virtual void print( std::ostream & os, Indenter indent = {} ) const override;
    701701};
     
    709709        virtual bool isComplete() const override{ return true; } // xxx - is this right?
    710710
    711         virtual VarArgsType *clone() const override { return new VarArgsType( *this ); }
    712         virtual void accept( Visitor & v ) override { v.visit( this ); }
    713         virtual void accept( Visitor & v ) const override { v.visit( this ); }
    714         virtual Type *acceptMutator( Mutator & m ) override { return m.mutate( this ); }
     711        virtual VarArgsType * clone() const override { return new VarArgsType( *this ); }
     712        virtual void accept( Visitor & v ) override { v.visit( this ); }
     713        virtual void accept( Visitor & v ) const override { v.visit( this ); }
     714        virtual Type * acceptMutator( Mutator & m ) override { return m.mutate( this ); }
    715715        virtual void print( std::ostream & os, Indenter indent = {} ) const override;
    716716};
     
    722722        ZeroType( Type::Qualifiers tq, const std::list< Attribute * > & attributes = std::list< Attribute * >()  );
    723723
    724         virtual ZeroType *clone() const override { return new ZeroType( *this ); }
    725         virtual void accept( Visitor & v ) override { v.visit( this ); }
    726         virtual void accept( Visitor & v ) const override { v.visit( this ); }
    727         virtual Type *acceptMutator( Mutator & m ) override { return m.mutate( this ); }
     724        virtual ZeroType * clone() const override { return new ZeroType( *this ); }
     725        virtual void accept( Visitor & v ) override { v.visit( this ); }
     726        virtual void accept( Visitor & v ) const override { v.visit( this ); }
     727        virtual Type * acceptMutator( Mutator & m ) override { return m.mutate( this ); }
    728728        virtual void print( std::ostream & os, Indenter indent = {} ) const override;
    729729};
     
    735735        OneType( Type::Qualifiers tq, const std::list< Attribute * > & attributes = std::list< Attribute * >()  );
    736736
    737         virtual OneType *clone() const override { return new OneType( *this ); }
    738         virtual void accept( Visitor & v ) override { v.visit( this ); }
    739         virtual void accept( Visitor & v ) const override { v.visit( this ); }
    740         virtual Type *acceptMutator( Mutator & m ) override { return m.mutate( this ); }
     737        virtual OneType * clone() const override { return new OneType( *this ); }
     738        virtual void accept( Visitor & v ) override { v.visit( this ); }
     739        virtual void accept( Visitor & v ) const override { v.visit( this ); }
     740        virtual Type * acceptMutator( Mutator & m ) override { return m.mutate( this ); }
    741741        virtual void print( std::ostream & os, Indenter indent = {} ) const override;
    742742};
     
    746746        GlobalScopeType();
    747747
    748         virtual GlobalScopeType *clone() const override { return new GlobalScopeType( *this ); }
    749         virtual void accept( Visitor & v ) override { v.visit( this ); }
    750         virtual void accept( Visitor & v ) const override { v.visit( this ); }
    751         virtual Type *acceptMutator( Mutator & m ) override { return m.mutate( this ); }
     748        virtual GlobalScopeType * clone() const override { return new GlobalScopeType( *this ); }
     749        virtual void accept( Visitor & v ) override { v.visit( this ); }
     750        virtual void accept( Visitor & v ) const override { v.visit( this ); }
     751        virtual Type * acceptMutator( Mutator & m ) override { return m.mutate( this ); }
    752752        virtual void print( std::ostream & os, Indenter indent = {} ) const override;
    753753};
Note: See TracChangeset for help on using the changeset viewer.