Changes in src/SynTree/Declaration.h [a7c90d4:3a5131ed]
- File:
-
- 1 edited
-
src/SynTree/Declaration.h (modified) (12 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/SynTree/Declaration.h
ra7c90d4 r3a5131ed 10 10 // Created On : Mon May 18 07:44:20 2015 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : T ue Mar 7 07:40:42201713 // Update Count : 11312 // Last Modified On : Thu Feb 16 14:53:35 2017 13 // Update Count : 57 14 14 // 15 15 … … 28 28 class Declaration : public BaseSyntaxNode { 29 29 public: 30 Declaration( const std::string &name, DeclarationNode::StorageClass es scs, LinkageSpec::Spec linkage );30 Declaration( const std::string &name, DeclarationNode::StorageClass sc, LinkageSpec::Spec linkage ); 31 31 Declaration( const Declaration &other ); 32 32 virtual ~Declaration(); … … 34 34 const std::string &get_name() const { return name; } 35 35 void set_name( std::string newValue ) { name = newValue; } 36 37 DeclarationNode::StorageClasses get_storageClasses() const { return storageClasses; } 38 36 DeclarationNode::StorageClass get_storageClass() const { return storageClass; } 37 void set_storageClass( DeclarationNode::StorageClass newValue ) { storageClass = newValue; } 39 38 LinkageSpec::Spec get_linkage() const { return linkage; } 40 39 void set_linkage( LinkageSpec::Spec newValue ) { linkage = newValue; } 41 40 bool get_isInline() const { return isInline; } 41 void set_isInline( bool newValue ) { isInline = newValue; } 42 bool get_isNoreturn() const { return isNoreturn; } 43 void set_isNoreturn( bool newValue ) { isNoreturn = newValue; } 42 44 UniqueId get_uniqueId() const { return uniqueId; } 43 44 45 bool get_extension() const { return extension; } 45 46 Declaration *set_extension( bool exten ) { extension = exten; return this; } … … 56 57 private: 57 58 std::string name; 58 DeclarationNode::StorageClass es storageClasses;59 DeclarationNode::StorageClass storageClass; 59 60 LinkageSpec::Spec linkage; 61 bool isInline, isNoreturn; 60 62 UniqueId uniqueId; 61 63 bool extension = false; … … 64 66 class DeclarationWithType : public Declaration { 65 67 public: 66 DeclarationWithType( const std::string &name, DeclarationNode::StorageClass es scs, LinkageSpec::Spec linkage, const std::list< Attribute * > & attributes, DeclarationNode::FuncSpecifiers fs );68 DeclarationWithType( const std::string &name, DeclarationNode::StorageClass sc, LinkageSpec::Spec linkage, const std::list< Attribute * > & attributes ); 67 69 DeclarationWithType( const DeclarationWithType &other ); 68 70 virtual ~DeclarationWithType(); … … 81 83 std::list< Attribute * >& get_attributes() { return attributes; } 82 84 const std::list< Attribute * >& get_attributes() const { return attributes; } 83 84 DeclarationNode::FuncSpecifiers get_funcSpec() const { return fs; }85 //void set_functionSpecifiers( DeclarationNode::FuncSpecifiers newValue ) { fs = newValue; }86 85 87 86 virtual DeclarationWithType *clone() const = 0; … … 98 97 ConstantExpr *asmName; 99 98 std::list< Attribute * > attributes; 100 DeclarationNode::FuncSpecifiers fs;101 99 }; 102 100 … … 104 102 typedef DeclarationWithType Parent; 105 103 public: 106 ObjectDecl( const std::string &name, DeclarationNode::StorageClasses scs, LinkageSpec::Spec linkage, Expression *bitfieldWidth, Type *type, Initializer *init, 107 const std::list< Attribute * > attributes = std::list< Attribute * >(), DeclarationNode::FuncSpecifiers fs = DeclarationNode::FuncSpecifiers() ); 104 ObjectDecl( const std::string &name, DeclarationNode::StorageClass sc, LinkageSpec::Spec linkage, Expression *bitfieldWidth, Type *type, Initializer *init, const std::list< Attribute * > attributes = std::list< Attribute * >(), bool isInline = false, bool isNoreturn = false ); 108 105 ObjectDecl( const ObjectDecl &other ); 109 106 virtual ~ObjectDecl(); … … 132 129 typedef DeclarationWithType Parent; 133 130 public: 134 FunctionDecl( const std::string &name, DeclarationNode::StorageClasses scs, LinkageSpec::Spec linkage, FunctionType *type, CompoundStmt *statements, 135 const std::list< Attribute * > attributes = std::list< Attribute * >(), DeclarationNode::FuncSpecifiers fs = DeclarationNode::FuncSpecifiers() ); 131 FunctionDecl( const std::string &name, DeclarationNode::StorageClass sc, LinkageSpec::Spec linkage, FunctionType *type, CompoundStmt *statements, bool isInline, bool isNoreturn, const std::list< Attribute * > attributes = std::list< Attribute * >() ); 136 132 FunctionDecl( const FunctionDecl &other ); 137 133 virtual ~FunctionDecl(); … … 158 154 typedef Declaration Parent; 159 155 public: 160 NamedTypeDecl( const std::string &name, DeclarationNode::StorageClass es scs, Type *type );156 NamedTypeDecl( const std::string &name, DeclarationNode::StorageClass sc, Type *type ); 161 157 NamedTypeDecl( const NamedTypeDecl &other ); 162 158 virtual ~NamedTypeDecl(); … … 193 189 }; 194 190 195 TypeDecl( const std::string &name, DeclarationNode::StorageClass es scs, Type *type, Kind kind );191 TypeDecl( const std::string &name, DeclarationNode::StorageClass sc, Type *type, Kind kind ); 196 192 TypeDecl( const TypeDecl &other ); 197 193 … … 214 210 typedef NamedTypeDecl Parent; 215 211 public: 216 TypedefDecl( const std::string &name, DeclarationNode::StorageClass es scs, Type *type ) : Parent( name, scs, type ) {}212 TypedefDecl( const std::string &name, DeclarationNode::StorageClass sc, Type *type ) : Parent( name, sc, type ) {} 217 213 TypedefDecl( const TypedefDecl &other ) : Parent( other ) {} 218 214
Note:
See TracChangeset
for help on using the changeset viewer.