Changeset b0d9ff7 for src/SynTree/Declaration.h
- Timestamp:
- Sep 1, 2022, 1:27:52 PM (2 years ago)
- Branches:
- ADT, ast-experimental, master, pthread-emulation, qualifiedEnum
- Children:
- 12df6fe
- Parents:
- def751f
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/SynTree/Declaration.h
rdef751f rb0d9ff7 145 145 virtual void printShort( std::ostream & os, Indenter indent = {} ) const override; 146 146 147 // TODO: Move to the right place148 147 void checkAssignedValue() const; 149 148 }; … … 338 337 typedef AggregateDecl Parent; 339 338 public: 339 bool isTyped; 340 Type * base; 341 340 342 EnumDecl( const std::string & name, 341 343 const std::list< Attribute * > & attributes = std::list< class Attribute * >(), 342 LinkageSpec::Spec linkage = LinkageSpec::Cforall, 343 Type * baseType = nullptr ) : Parent( name, attributes, linkage ) , base( baseType ){} 344 EnumDecl( const EnumDecl & other ) : Parent( other ), base( other.base ) {} 345 344 bool isTyped = false, LinkageSpec::Spec linkage = LinkageSpec::Cforall, 345 Type * baseType = nullptr ) 346 : Parent( name, attributes, linkage ),isTyped(isTyped), base( baseType ) {} 347 EnumDecl( const EnumDecl & other ) 348 : Parent( other ), isTyped( other.isTyped), base( other.base ) {} 346 349 bool valueOf( Declaration * enumerator, long long int & value ); 347 348 350 virtual EnumDecl * clone() const override { return new EnumDecl( *this ); } 349 351 virtual void accept( Visitor & v ) override { v.visit( this ); } 350 352 virtual void accept( Visitor & v ) const override { v.visit( this ); } 351 353 virtual Declaration * acceptMutator( Mutator & m ) override { return m.mutate( this ); } 352 Type * base; 353 std::unordered_map< std::string, long long int > enumValues; 354 355 std::unordered_map< std::string, long long int > enumValues; // This attribute is unused 354 356 virtual void print( std::ostream & os, Indenter indent = {} ) const override final; 355 357 private:
Note: See TracChangeset
for help on using the changeset viewer.