Changeset 4559b34 for src/SynTree
- Timestamp:
- Apr 3, 2022, 8:49:42 PM (4 years ago)
- Branches:
- ADT, ast-experimental, enum, master, pthread-emulation, qualifiedEnum
- Children:
- 92538ab
- Parents:
- 3eb1653
- Location:
- src/SynTree
- Files:
-
- 2 edited
-
AggregateDecl.cc (modified) (2 diffs)
-
Declaration.h (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/SynTree/AggregateDecl.cc
r3eb1653 r4559b34 59 59 } // if 60 60 os << " with body " << has_body(); 61 62 61 if ( ! parameters.empty() ) { 63 62 os << endl << indent << "... with parameters" << endl; … … 106 105 const char * EnumDecl::typeString() const { return aggrString( Enum ); } 107 106 107 void EnumDecl::print( std::ostream & os, Indenter indent ) const { 108 AggregateDecl::print(os, indent); 109 os << " with base? " << (base? "True" : "False") << std::endl; 110 if ( base ) { 111 os << "Base Type of Enum:" << std::endl; 112 base->print(os, indent); 113 } 114 os << std::endl << "End of EnumDecl::print" << std::endl; 115 } 116 108 117 const char * TraitDecl::typeString() const { return aggrString( Trait ); } 109 118 -
src/SynTree/Declaration.h
r3eb1653 r4559b34 290 290 AggregateDecl * set_body( bool body ) { AggregateDecl::body = body; return this; } 291 291 292 virtual void print( std::ostream & os, Indenter indent = {} ) const override final;292 virtual void print( std::ostream & os, Indenter indent = {} ) const override; 293 293 virtual void printShort( std::ostream & os, Indenter indent = {} ) const override; 294 294 protected: … … 352 352 Type * base; 353 353 std::unordered_map< std::string, long long int > enumValues; 354 virtual void print( std::ostream & os, Indenter indent = {} ) const override final; 354 355 private: 355 356 // std::unordered_map< std::string, long long int > enumValues;
Note:
See TracChangeset
for help on using the changeset viewer.