Changeset 2e9b59b for src/AST/Print.cpp
- Timestamp:
- Apr 19, 2022, 3:00:04 PM (3 years ago)
- Branches:
- ADT, ast-experimental, master, pthread-emulation, qualifiedEnum
- Children:
- 5b84a321
- Parents:
- ba897d21 (diff), bb7c77d (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/AST/Print.cpp
rba897d21 r2e9b59b 210 210 } 211 211 212 auto ptrToEnum = dynamic_cast<const ast::EnumDecl *>(node); 213 if ( ! short_mode && ptrToEnum && ptrToEnum->base ) { 214 os << endl << indent << ".. with (enum) base" << endl; 215 ++indent; 216 ptrToEnum->base->accept( *this ); 217 --indent; 218 } 219 212 220 os << endl; 213 221 } … … 589 597 590 598 ++indent; 591 for ( const ast:: Stmt * stmt : node->stmts ) {599 for ( const ast::CaseClause * stmt : node->cases ) { 592 600 stmt->accept( *this ); 593 601 } … … 597 605 } 598 606 599 virtual const ast:: Stmt * visit( const ast::CaseStmt* node ) override final {607 virtual const ast::CaseClause * visit( const ast::CaseClause * node ) override final { 600 608 if ( node->isDefault() ) { 601 609 os << indent << "Default "; … … 679 687 680 688 os << indent-1 << "... and handlers:" << endl; 681 for ( const ast::Catch Stmt* stmt : node->handlers ) {689 for ( const ast::CatchClause * stmt : node->handlers ) { 682 690 os << indent; 683 691 stmt->accept( *this ); … … 693 701 } 694 702 695 virtual const ast:: Stmt * visit( const ast::CatchStmt* node ) override final {703 virtual const ast::CatchClause * visit( const ast::CatchClause * node ) override final { 696 704 os << "Catch "; 697 705 switch ( node->kind ) { … … 718 726 } 719 727 720 virtual const ast:: Stmt * visit( const ast::FinallyStmt* node ) override final {728 virtual const ast::FinallyClause * visit( const ast::FinallyClause * node ) override final { 721 729 os << "Finally Statement" << endl; 722 730 os << indent << "... with block:" << endl; … … 1088 1096 virtual const ast::Expr * visit( const ast::TypeExpr * node ) override final { 1089 1097 safe_print( node->type ); 1098 postprint( node ); 1099 1100 return node; 1101 } 1102 1103 virtual const ast::Expr * visit( const ast::DimensionExpr * node ) override final { 1104 os << "Type-Sys Value: " << node->name; 1090 1105 postprint( node ); 1091 1106
Note:
See TracChangeset
for help on using the changeset viewer.