Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/SynTree/Statement.h

    rcc32d83 r68f9c43  
    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
     
    3838
    3939        Statement( const std::list<Label> & labels = {} );
    40         virtual ~Statement();
    4140
    4241        std::list<Label> & get_labels() { return labels; }
     
    5655        CompoundStmt( std::list<Statement *> stmts );
    5756        CompoundStmt( const CompoundStmt &other );
    58         virtual ~CompoundStmt();
    5957
    6058        std::list<Statement*>& get_kids() { return kids; }
     
    8482        ExprStmt( Expression *expr );
    8583        ExprStmt( const ExprStmt &other );
    86         virtual ~ExprStmt();
    8784
    8885        Expression *get_expr() { return expr; }
     
    105102        AsmStmt( bool voltile, Expression *instruction, std::list<Expression *> output, std::list<Expression *> input, std::list<ConstantExpr *> clobber, std::list<Label> gotolabels );
    106103        AsmStmt( const AsmStmt &other );
    107         virtual ~AsmStmt();
    108104
    109105        bool get_voltile() { return voltile; }
     
    126122};
    127123
    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 
    141124class IfStmt : public Statement {
    142125  public:
     
    149132                        std::list<Statement *> initialization = std::list<Statement *>() );
    150133        IfStmt( const IfStmt &other );
    151         virtual ~IfStmt();
    152134
    153135        std::list<Statement *> &get_initialization() { return initialization; }
     
    172154        SwitchStmt( Expression *condition, const std::list<Statement *> &statements );
    173155        SwitchStmt( const SwitchStmt &other );
    174         virtual ~SwitchStmt();
    175156
    176157        Expression *get_condition() { return condition; }
     
    194175        CaseStmt( Expression *conditions, const std::list<Statement *> &stmts, bool isdef = false ) throw (SemanticErrorException);
    195176        CaseStmt( const CaseStmt &other );
    196         virtual ~CaseStmt();
    197177
    198178        static CaseStmt * makeDefault( const std::list<Label> & labels = {}, std::list<Statement *> stmts = std::list<Statement *>() );
     
    225205               Statement *body, bool isDoWhile = false );
    226206        WhileStmt( const WhileStmt &other );
    227         virtual ~WhileStmt();
    228207
    229208        Expression *get_condition() { return condition; }
     
    250229             Expression *condition = 0, Expression *increment = 0, Statement *body = 0 );
    251230        ForStmt( const ForStmt &other );
    252         virtual ~ForStmt();
    253231
    254232        std::list<Statement *> &get_initialization() { return initialization; }
     
    268246class BranchStmt : public Statement {
    269247  public:
    270         enum Type { Goto = 0, Break, Continue, FallThrough, FallThroughDefault };
     248        enum Type { Goto = 0, Break, Continue };
    271249
    272250        // originalTarget kept for error messages.
     
    303281        ReturnStmt( Expression *expr );
    304282        ReturnStmt( const ReturnStmt &other );
    305         virtual ~ReturnStmt();
    306283
    307284        Expression *get_expr() { return expr; }
     
    324301        ThrowStmt( Kind kind, Expression * expr, Expression * target = nullptr );
    325302        ThrowStmt( const ThrowStmt &other );
    326         virtual ~ThrowStmt();
    327303
    328304        Kind get_kind() { return kind; }
     
    346322        TryStmt( CompoundStmt *tryBlock, std::list<CatchStmt *> &handlers, FinallyStmt *finallyBlock = 0 );
    347323        TryStmt( const TryStmt &other );
    348         virtual ~TryStmt();
    349324
    350325        CompoundStmt *get_block() const { return block; }
     
    373348                   Expression *cond, Statement *body );
    374349        CatchStmt( const CatchStmt &other );
    375         virtual ~CatchStmt();
    376350
    377351        Kind get_kind() { return kind; }
     
    395369        FinallyStmt( CompoundStmt *block );
    396370        FinallyStmt( const FinallyStmt &other );
    397         virtual ~FinallyStmt();
    398371
    399372        CompoundStmt *get_block() const { return block; }
     
    422395        WaitForStmt();
    423396        WaitForStmt( const WaitForStmt & );
    424         virtual ~WaitForStmt();
    425397
    426398        std::vector<Clause> clauses;
     
    451423        WithStmt( const std::list< Expression * > & exprs, Statement * stmt );
    452424        WithStmt( const WithStmt & other );
    453         virtual ~WithStmt();
    454425
    455426        virtual WithStmt * clone() const override { return new WithStmt( *this ); }
     
    467438        DeclStmt( Declaration *decl );
    468439        DeclStmt( const DeclStmt &other );
    469         virtual ~DeclStmt();
    470440
    471441        Declaration *get_decl() const { return decl; }
     
    489459        ImplicitCtorDtorStmt( Statement * callStmt );
    490460        ImplicitCtorDtorStmt( const ImplicitCtorDtorStmt & other );
    491         virtual ~ImplicitCtorDtorStmt();
    492461
    493462        Statement *get_callStmt() const { return callStmt; }
Note: See TracChangeset for help on using the changeset viewer.