Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/SynTree/Declaration.h

    r712348a r0e73845  
    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 : Thr May  2 10:47:00 2019
    13 // Update Count     : 135
     11// Last Modified By : Peter A. Buhr
     12// Last Modified On : Sun Sep  3 19:24:06 2017
     13// Update Count     : 131
    1414//
    1515
     
    1919#include <iosfwd>                // for ostream
    2020#include <list>                  // for list
    21 #include <unordered_map>         // for unordered_map
    2221#include <string>                // for string, operator+, allocator, to_string
    2322
     
    7170        static Declaration *declFromId( UniqueId id );
    7271
     72  private:
     73        Type::StorageClasses storageClasses;
    7374        UniqueId uniqueId;
    74         Type::StorageClasses storageClasses;
    75   private:
    7675};
    7776
     
    167166        CompoundStmt *get_statements() const { return statements; }
    168167        void set_statements( CompoundStmt *newValue ) { statements = newValue; }
    169         bool has_body() const { return NULL != statements; }
    170168
    171169        static FunctionDecl * newFunction( const std::string & name, FunctionType * type, CompoundStmt * statements );
     
    213211                TypeDecl::Kind kind;
    214212                bool isComplete;
    215 
    216213                Data() : kind( (TypeDecl::Kind)-1 ), isComplete( false ) {}
    217214                Data( TypeDecl * typeDecl ) : Data( typeDecl->get_kind(), typeDecl->isComplete() ) {}
    218215                Data( Kind kind, bool isComplete ) : kind( kind ), isComplete( isComplete ) {}
    219                 Data( const Data& d1, const Data& d2 )
    220                 : kind( d1.kind ), isComplete ( d1.isComplete || d2.isComplete ) {}
    221 
    222216                bool operator==(const Data & other) const { return kind == other.kind && isComplete == other.isComplete; }
    223217                bool operator!=(const Data & other) const { return !(*this == other);}
     
    245239        virtual void print( std::ostream &os, Indenter indent = {} ) const override;
    246240
     241  private:
    247242        Kind kind;
    248243};
     
    305300        virtual void accept( Visitor &v ) override { v.visit( this ); }
    306301        virtual Declaration *acceptMutator( Mutator &m )  override { return m.mutate( this ); }
     302  private:
    307303        DeclarationNode::Aggregate kind;
    308   private:
    309304        virtual std::string typeString() const override;
    310305};
     
    335330        virtual Declaration *acceptMutator( Mutator &m )  override { return m.mutate( this ); }
    336331  private:
    337         std::unordered_map< std::string, long long int > enumValues;
     332        std::map< std::string, long long int > enumValues;
    338333        virtual std::string typeString() const override;
    339334};
Note: See TracChangeset for help on using the changeset viewer.