Changes in src/SynTree/Declaration.h [fa4805f:bdd0755]
- File:
-
- 1 edited
-
src/SynTree/Declaration.h (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/SynTree/Declaration.h
rfa4805f rbdd0755 9 9 // Author : Richard C. Bilson 10 10 // Created On : Mon May 18 07:44:20 2015 11 // Last Modified By : Andrew Beach12 // Last Modified On : Tus Jun 27 15:31:00201713 // Update Count : 12 211 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Fri Mar 17 16:05:08 2017 13 // Update Count : 121 14 14 // 15 15 … … 194 194 }; 195 195 196 TypeDecl( const std::string &name, Type::StorageClasses scs, Type *type, Kind kind , Type * init = nullptr);196 TypeDecl( const std::string &name, Type::StorageClasses scs, Type *type, Kind kind ); 197 197 TypeDecl( const TypeDecl &other ); 198 virtual ~TypeDecl();199 198 200 199 Kind get_kind() const { return kind; } 201 202 Type * get_init() const { return init; }203 TypeDecl * set_init( Type * newValue ) { init = newValue; return this; }204 200 205 201 bool isComplete() const { return kind == Any || sized; } … … 213 209 virtual void accept( Visitor &v ) { v.visit( this ); } 214 210 virtual TypeDecl *acceptMutator( Mutator &m ) { return m.mutate( this ); } 215 virtual void print( std::ostream &os, int indent = 0 ) const;216 217 211 private: 218 212 Kind kind; 219 Type * init;220 213 bool sized; 221 214 }; … … 238 231 typedef Declaration Parent; 239 232 public: 240 AggregateDecl( const std::string &name, const std::list< Attribute * > & attributes = std::list< class Attribute * >() , LinkageSpec::Spec linkage = LinkageSpec::Cforall);233 AggregateDecl( const std::string &name, const std::list< Attribute * > & attributes = std::list< class Attribute * >() ); 241 234 AggregateDecl( const AggregateDecl &other ); 242 235 virtual ~AggregateDecl(); … … 266 259 typedef AggregateDecl Parent; 267 260 public: 268 StructDecl( const std::string &name, DeclarationNode::Aggregate kind = DeclarationNode::Struct, const std::list< Attribute * > & attributes = std::list< class Attribute * >() , LinkageSpec::Spec linkage = LinkageSpec::Cforall ) : Parent( name, attributes, linkage), kind( kind ) {}261 StructDecl( const std::string &name, DeclarationNode::Aggregate kind = DeclarationNode::Struct, const std::list< Attribute * > & attributes = std::list< class Attribute * >() ) : Parent( name, attributes ), kind( kind ) {} 269 262 StructDecl( const StructDecl &other ) : Parent( other ) {} 270 263 … … 284 277 typedef AggregateDecl Parent; 285 278 public: 286 UnionDecl( const std::string &name, const std::list< Attribute * > & attributes = std::list< class Attribute * >() , LinkageSpec::Spec linkage = LinkageSpec::Cforall ) : Parent( name, attributes, linkage) {}279 UnionDecl( const std::string &name, const std::list< Attribute * > & attributes = std::list< class Attribute * >() ) : Parent( name, attributes ) {} 287 280 UnionDecl( const UnionDecl &other ) : Parent( other ) {} 288 281 … … 297 290 typedef AggregateDecl Parent; 298 291 public: 299 EnumDecl( const std::string &name, const std::list< Attribute * > & attributes = std::list< class Attribute * >() , LinkageSpec::Spec linkage = LinkageSpec::Cforall ) : Parent( name, attributes, linkage) {}292 EnumDecl( const std::string &name, const std::list< Attribute * > & attributes = std::list< class Attribute * >() ) : Parent( name, attributes ) {} 300 293 EnumDecl( const EnumDecl &other ) : Parent( other ) {} 301 294
Note:
See TracChangeset
for help on using the changeset viewer.