Changes in src/SynTree/Declaration.h [e4d7c1c:561354f]
- File:
-
- 1 edited
-
src/SynTree/Declaration.h (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/SynTree/Declaration.h
re4d7c1c r561354f 268 268 typedef Declaration Parent; 269 269 public: 270 enum Aggregate { Struct, Union, Enum, Exception, Trait, Generator, Coroutine, Monitor, Thread, NoAggregate };270 enum Aggregate { Struct, Union, Enum, Exception, Trait, Generator, Coroutine, Monitor, Thread, NoAggregate, ADT }; 271 271 static const char * aggrString( Aggregate aggr ); 272 272 … … 362 362 }; 363 363 364 class AdtDecl : public AggregateDecl { 365 typedef AggregateDecl Parent; 366 public: 367 std::list<StructDecl*> data_constructors; 368 UnionDecl * data_union; 369 EnumDecl * tag; 370 StructDecl * tag_union; 371 372 AdtDecl( const std::string & name, 373 const std::list< Attribute * > & attributes = std::list< class Attribute * >(), 374 LinkageSpec::Spec linkage = LinkageSpec::Cforall, 375 const std::list< StructDecl* > data_constructors = std::list< StructDecl * >(), 376 UnionDecl * data_union = nullptr, EnumDecl * tag = nullptr, StructDecl * tag_union = nullptr ) 377 : Parent( name, attributes, linkage ), data_constructors(data_constructors), 378 data_union( data_union ), tag( tag ), tag_union( tag_union ) {} 379 380 AdtDecl( const AdtDecl & other ) 381 : Parent( other ) {} 382 383 virtual AdtDecl * clone() const override { return new AdtDecl( *this ); } 384 virtual void accept( Visitor & v ) override { v.visit( this ); } 385 virtual void accept( Visitor & v ) const override { v.visit( this ); } 386 387 virtual Declaration * acceptMutator( Mutator & m ) override { return m.mutate( this ); } 388 virtual void print( std::ostream & os, Indenter indent = {} ) const override final { 389 os << "AdtDecl ... " << indent; 390 } 391 392 private: 393 virtual const char * typeString() const override { 394 return "AdtDecl"; 395 } 396 }; 397 364 398 class TraitDecl : public AggregateDecl { 365 399 typedef AggregateDecl Parent;
Note:
See TracChangeset
for help on using the changeset viewer.