Changeset 6ea87486 for src/SynTree/Declaration.h
- Timestamp:
- Jul 14, 2017, 5:25:25 PM (7 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:
- bac5158
- Parents:
- 4b234f0
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/SynTree/Declaration.h
r4b234f0 r6ea87486 10 10 // Created On : Mon May 18 07:44:20 2015 11 11 // Last Modified By : Andrew Beach 12 // Last Modified On : Tus Jun 27 15:31:00 201713 // Update Count : 12 212 // Last Modified On : Fri Jul 14 16:59:00 2017 13 // Update Count : 123 14 14 // 15 15 … … 266 266 typedef AggregateDecl Parent; 267 267 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 ) {} 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 ), tagged( false ), parent_name( "" ) {} 269 StructDecl( const std::string &name, const std::string *parent, const std::list< Attribute * > & attributes = std::list< class Attribute * >(), LinkageSpec::Spec linkage = LinkageSpec::Cforall ) : Parent( name, attributes, linkage ), kind( DeclarationNode::Struct ), tagged( true ), parent_name( parent ? *parent : "" ) {} 269 270 StructDecl( const StructDecl &other ) : Parent( other ) {} 270 271 … … 273 274 bool is_thread() { return kind == DeclarationNode::Thread; } 274 275 276 // Tagged/Tree Structure Excetion 277 bool get_tagged() { return tagged; } 278 void set_tagged( bool newValue ) { tagged = newValue; } 279 bool has_parent() { return parent_name != ""; } 280 std::string get_parentName() { return parent_name; } 281 275 282 virtual StructDecl *clone() const { return new StructDecl( *this ); } 276 283 virtual void accept( Visitor &v ) { v.visit( this ); } … … 279 286 DeclarationNode::Aggregate kind; 280 287 virtual std::string typeString() const; 288 289 bool tagged; 290 std::string parent_name; 281 291 }; 282 292
Note: See TracChangeset
for help on using the changeset viewer.