Changeset c0aa336 for src/SynTree/Declaration.h
- Timestamp:
- Feb 6, 2017, 4:19:41 PM (8 years ago)
- Branches:
- ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, deferred_resn, demangler, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, with_gc
- Children:
- b4d65c7
- Parents:
- a362f97
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/SynTree/Declaration.h
ra362f97 rc0aa336 10 10 // Created On : Mon May 18 07:44:20 2015 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Tue Dec 13 13:37:33 201613 // Update Count : 4912 // Last Modified On : Fri Jan 20 15:07:29 2017 13 // Update Count : 53 14 14 // 15 15 … … 225 225 typedef Declaration Parent; 226 226 public: 227 AggregateDecl( const std::string &name );227 AggregateDecl( const std::string &name, const std::list< Attribute * > & attributes = std::list< class Attribute * >() ); 228 228 AggregateDecl( const AggregateDecl &other ); 229 229 virtual ~AggregateDecl(); … … 231 231 std::list<Declaration*>& get_members() { return members; } 232 232 std::list<TypeDecl*>& get_parameters() { return parameters; } 233 234 std::list< Attribute * >& get_attributes() { return attributes; } 235 const std::list< Attribute * >& get_attributes() const { return attributes; } 233 236 234 237 bool has_body() const { return body; } … … 244 247 std::list<TypeDecl*> parameters; 245 248 bool body; 249 std::list< Attribute * > attributes; 246 250 }; 247 251 … … 249 253 typedef AggregateDecl Parent; 250 254 public: 251 StructDecl( const std::string &name ) : Parent( name) {}255 StructDecl( const std::string &name, const std::list< Attribute * > & attributes = std::list< class Attribute * >() ) : Parent( name, attributes ) {} 252 256 StructDecl( const StructDecl &other ) : Parent( other ) {} 253 257 … … 262 266 typedef AggregateDecl Parent; 263 267 public: 264 UnionDecl( const std::string &name ) : Parent( name) {}268 UnionDecl( const std::string &name, const std::list< Attribute * > & attributes = std::list< class Attribute * >() ) : Parent( name, attributes ) {} 265 269 UnionDecl( const UnionDecl &other ) : Parent( other ) {} 266 270 … … 275 279 typedef AggregateDecl Parent; 276 280 public: 277 EnumDecl( const std::string &name ) : Parent( name) {}281 EnumDecl( const std::string &name, const std::list< Attribute * > & attributes = std::list< class Attribute * >() ) : Parent( name, attributes ) {} 278 282 EnumDecl( const EnumDecl &other ) : Parent( other ) {} 279 283 … … 288 292 typedef AggregateDecl Parent; 289 293 public: 290 TraitDecl( const std::string &name ) : Parent( name ) {} 294 TraitDecl( const std::string &name, const std::list< Attribute * > & attributes ) : Parent( name ) { 295 assertf( attributes.empty(), "attribute unsupported for traits" ); 296 } 291 297 TraitDecl( const TraitDecl &other ) : Parent( other ) {} 292 298
Note: See TracChangeset
for help on using the changeset viewer.