Changeset 427854b for src/SynTree


Ignore:
Timestamp:
Mar 2, 2020, 4:59:27 PM (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:
dfa4360
Parents:
37cdd97
Message:

First draft implementation of generators, still missing error checking, testing and clean-up

Location:
src/SynTree
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • src/SynTree/Declaration.h

    r37cdd97 r427854b  
    302302
    303303        bool is_coroutine() { return kind == Coroutine; }
    304         bool is_monitor() { return kind == Monitor; }
    305         bool is_thread() { return kind == Thread; }
     304        bool is_generator() { return kind == Generator; }
     305        bool is_monitor  () { return kind == Monitor  ; }
     306        bool is_thread   () { return kind == Thread   ; }
    306307
    307308        virtual StructDecl * clone() const override { return new StructDecl( *this ); }
  • src/SynTree/Statement.h

    r37cdd97 r427854b  
    425425  public:
    426426        CompoundStmt * then = nullptr;
    427         enum { None, Coroutine, Generator } type = None;
     427        enum Type { None, Coroutine, Generator } type = None;
    428428
    429429        SuspendStmt() = default;
Note: See TracChangeset for help on using the changeset viewer.