Changeset 5b544a6 for src/AST/Print.cpp


Ignore:
Timestamp:
Mar 9, 2020, 11:09:52 AM (4 years ago)
Author:
Thierry Delisle <tdelisle@…>
Branches:
ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, pthread-emulation, qualifiedEnum
Children:
6565321
Parents:
87f572e (diff), e6cfa8ff (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 'generator'

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/AST/Print.cpp

    r87f572e r5b544a6  
    674674                safe_print( node->body );
    675675                --indent;
     676
     677                return node;
     678        }
     679
     680        virtual const ast::Stmt * visit( const ast::SuspendStmt * node ) override final {
     681                os << "Suspend Statement";
     682                switch (node->type) {
     683                        case ast::SuspendStmt::None     : os << " with implicit target"; break;
     684                        case ast::SuspendStmt::Generator: os << " for generator"; break;
     685                        case ast::SuspendStmt::Coroutine: os << " for coroutine"; break;
     686                }
     687                os << endl;
     688
     689                ++indent;
     690                if(node->then) {
     691                        os << indent << " with post statement :" << endl;
     692                        safe_print( node->then );
     693                }
     694                ++indent;
    676695
    677696                return node;
Note: See TracChangeset for help on using the changeset viewer.