Changeset fc12f05 for src/AST/Print.cpp


Ignore:
Timestamp:
Nov 13, 2023, 3:43:43 AM (23 months ago)
Author:
JiadaL <j82liang@…>
Branches:
master
Children:
25f2798
Parents:
0030b508 (diff), 2174191 (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:

Merge branch 'master' of plg.uwaterloo.ca:software/cfa/cfa-cc

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/AST/Print.cpp

    r0030b508 rfc12f05  
    934934        }
    935935
     936        virtual const ast::Stmt * visit( const ast::CoforStmt * node ) override final {
     937                os << "Cofor Statement" << endl;
     938
     939                if ( ! node->inits.empty() ) {
     940                        os << indent << "... initialization:" << endl;
     941                        ++indent;
     942                        for ( const ast::Stmt * stmt : node->inits ) {
     943                                os << indent+1;
     944                                safe_print( stmt );
     945                        }
     946                        --indent;
     947                }
     948
     949                if ( node->cond ) {
     950                        os << indent << "... condition:" << endl;
     951                        ++indent;
     952                        os << indent;
     953                        node->cond->accept( *this );
     954                        --indent;
     955                }
     956
     957                if ( node->inc ) {
     958                        os << indent << "... increment:" << endl;
     959                        ++indent;
     960                        os << indent;
     961                        node->inc->accept( *this );
     962                        --indent;
     963                }
     964
     965                if ( node->body ) {
     966                        os << indent << "... with body:" << endl;
     967                        ++indent;
     968                        os << indent;
     969                        node->body->accept( *this );
     970                        --indent;
     971                }
     972                os << endl;
     973                print( node->labels );
     974
     975                return node;
     976        }
     977
    936978        virtual const ast::Expr * visit( const ast::ApplicationExpr * node ) override final {
    937979                ++indent;
Note: See TracChangeset for help on using the changeset viewer.