Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/SynTree/Statement.h

    ree3c93d rba3706f  
    1010// Created On       : Mon May 18 07:44:20 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Thu Mar  8 14:53:02 2018
    13 // Update Count     : 78
     12// Last Modified On : Sun Sep  3 20:46:46 2017
     13// Update Count     : 77
    1414//
    1515
     
    126126};
    127127
    128 class DirectiveStmt : public Statement {
    129         public:
    130         std::string directive;
    131 
    132         DirectiveStmt( const std::string & );
    133         virtual ~DirectiveStmt(){}
    134 
    135         virtual DirectiveStmt * clone() const { return new DirectiveStmt( *this ); }
    136         virtual void accept( Visitor & v ) { v.visit( this ); }
    137         virtual Statement * acceptMutator( Mutator & m ) { return m.mutate( this ); }
    138         virtual void print( std::ostream & os, Indenter indent = {} ) const;
    139 };
    140 
    141128class IfStmt : public Statement {
    142129  public:
     
    192179        std::list<Statement *> stmts;
    193180
    194         CaseStmt( Expression *conditions, const std::list<Statement *> &stmts, bool isdef = false ) throw (SemanticErrorException);
     181        CaseStmt( Expression *conditions, const std::list<Statement *> &stmts, bool isdef = false ) throw(SemanticError);
    195182        CaseStmt( const CaseStmt &other );
    196183        virtual ~CaseStmt();
     
    220207        Expression *condition;
    221208        Statement *body;
    222         std::list<Statement *> initialization;
    223209        bool isDoWhile;
    224210
    225211        WhileStmt( Expression *condition,
    226                Statement *body, std::list<Statement *> & initialization, bool isDoWhile = false );
     212               Statement *body, bool isDoWhile = false );
    227213        WhileStmt( const WhileStmt &other );
    228214        virtual ~WhileStmt();
     
    269255class BranchStmt : public Statement {
    270256  public:
    271         enum Type { Goto = 0, Break, Continue, FallThrough, FallThroughDefault };
     257        enum Type { Goto = 0, Break, Continue };
    272258
    273259        // originalTarget kept for error messages.
     
    277263        Type type;
    278264
    279         BranchStmt( Label target, Type ) throw (SemanticErrorException);
    280         BranchStmt( Expression *computedTarget, Type ) throw (SemanticErrorException);
     265        BranchStmt( Label target, Type ) throw (SemanticError);
     266        BranchStmt( Expression *computedTarget, Type ) throw (SemanticError);
    281267
    282268        Label get_originalTarget() { return originalTarget; }
     
    445431};
    446432
    447 class WithStmt : public Statement {
    448 public:
    449         std::list< Expression * > exprs;
    450         Statement * stmt;
    451 
    452         WithStmt( const std::list< Expression * > & exprs, Statement * stmt );
    453         WithStmt( const WithStmt & other );
    454         virtual ~WithStmt();
    455 
    456         virtual WithStmt * clone() const override { return new WithStmt( *this ); }
    457         virtual void accept( Visitor & v ) override { v.visit( this ); }
    458         virtual Statement * acceptMutator( Mutator & m )  override { return m.mutate( this ); }
    459         virtual void print( std::ostream & os, Indenter indent = {} ) const override;
    460 };
    461 
    462433
    463434// represents a declaration that occurs as part of a compound statement
Note: See TracChangeset for help on using the changeset viewer.