Changeset 2e9b59b for src/AST/Print.cpp


Ignore:
Timestamp:
Apr 19, 2022, 3:00:04 PM (3 years ago)
Author:
m3zulfiq <m3zulfiq@…>
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.
Message:

added benchmark and evaluations chapter to thesis

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/AST/Print.cpp

    rba897d21 r2e9b59b  
    210210                }
    211211
     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
    212220                os << endl;
    213221        }
     
    589597
    590598                ++indent;
    591                 for ( const ast::Stmt * stmt : node->stmts ) {
     599                for ( const ast::CaseClause * stmt : node->cases ) {
    592600                        stmt->accept( *this );
    593601                }
     
    597605        }
    598606
    599         virtual const ast::Stmt * visit( const ast::CaseStmt * node ) override final {
     607        virtual const ast::CaseClause * visit( const ast::CaseClause * node ) override final {
    600608                if ( node->isDefault() ) {
    601609                        os << indent << "Default ";
     
    679687
    680688                os << indent-1 << "... and handlers:" << endl;
    681                 for ( const ast::CatchStmt * stmt : node->handlers ) {
     689                for ( const ast::CatchClause * stmt : node->handlers ) {
    682690                        os << indent;
    683691                        stmt->accept( *this );
     
    693701        }
    694702
    695         virtual const ast::Stmt * visit( const ast::CatchStmt * node ) override final {
     703        virtual const ast::CatchClause * visit( const ast::CatchClause * node ) override final {
    696704                os << "Catch ";
    697705                switch ( node->kind ) {
     
    718726        }
    719727
    720         virtual const ast::Stmt * visit( const ast::FinallyStmt * node ) override final {
     728        virtual const ast::FinallyClause * visit( const ast::FinallyClause * node ) override final {
    721729                os << "Finally Statement" << endl;
    722730                os << indent << "... with block:" << endl;
     
    10881096        virtual const ast::Expr * visit( const ast::TypeExpr * node ) override final {
    10891097                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;
    10901105                postprint( node );
    10911106
Note: See TracChangeset for help on using the changeset viewer.