Changeset fa2c005 for src/SynTree/Type.h
- Timestamp:
- Jun 8, 2023, 3:19:43 PM (12 months ago)
- Branches:
- ADT
- Parents:
- 044ae62
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/SynTree/Type.h
r044ae62 rfa2c005 476 476 }; 477 477 478 class AdtInstType : public ReferenceToType { 479 typedef ReferenceToType Parent; 480 public: 481 AdtDecl * baseAdt; 482 483 AdtInstType( const Type::Qualifiers & tq, const std::string & name, const std::list< Attribute * > & attributes = std::list< Attribute * >() ) : Parent( tq, name, attributes ), baseAdt( 0 ) {} 484 AdtInstType( const Type::Qualifiers & tq, AdtDecl * baseAdt, const std::list< Attribute * > & attributes = std::list< Attribute * >() ); 485 AdtInstType( const AdtInstType & other ) : Parent( other ), baseAdt( other.baseAdt ) {} 486 487 AdtDecl * get_baseAdt() const { return baseAdt; } 488 void set_baseAdt( AdtDecl * newValue ) { baseAdt = newValue; } 489 490 std::list<TypeDecl*> * get_baseParameters(); 491 const std::list<TypeDecl*> * get_baseParameters() const; 492 493 virtual bool isComplete() const override; 494 495 virtual AggregateDecl * getAggr() const override; 496 497 virtual TypeSubstitution genericSubstitution() const override; 498 499 void lookup( const std::string & name, std::list< Declaration* > & foundDecls ) const override; 500 501 virtual AdtInstType * clone() const override { return new AdtInstType( * this ); } 502 virtual void accept( Visitor & v ) override { v.visit( this ); } 503 virtual void accept( Visitor & v ) const override { v.visit( this ); } 504 virtual Type * acceptMutator( Mutator & m ) override { return m.mutate( this ); } 505 506 virtual void print( std::ostream & os, Indenter indenter = {} ) const override; 507 private: 508 virtual std::string typeString() const override; 509 }; 510 478 511 class UnionInstType : public ReferenceToType { 479 512 typedef ReferenceToType Parent;
Note: See TracChangeset
for help on using the changeset viewer.