Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/SynTree/Statement.h

    r68f9c43 r6a276a0  
    1010// Created On       : Mon May 18 07:44:20 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Sun Sep  3 20:46:46 2017
    13 // Update Count     : 77
     12// Last Modified On : Thu Mar  8 14:53:02 2018
     13// Update Count     : 78
    1414//
    1515
     
    3838
    3939        Statement( const std::list<Label> & labels = {} );
     40        virtual ~Statement();
    4041
    4142        std::list<Label> & get_labels() { return labels; }
     
    5556        CompoundStmt( std::list<Statement *> stmts );
    5657        CompoundStmt( const CompoundStmt &other );
     58        virtual ~CompoundStmt();
    5759
    5860        std::list<Statement*>& get_kids() { return kids; }
     
    8284        ExprStmt( Expression *expr );
    8385        ExprStmt( const ExprStmt &other );
     86        virtual ~ExprStmt();
    8487
    8588        Expression *get_expr() { return expr; }
     
    102105        AsmStmt( bool voltile, Expression *instruction, std::list<Expression *> output, std::list<Expression *> input, std::list<ConstantExpr *> clobber, std::list<Label> gotolabels );
    103106        AsmStmt( const AsmStmt &other );
     107        virtual ~AsmStmt();
    104108
    105109        bool get_voltile() { return voltile; }
     
    132136                        std::list<Statement *> initialization = std::list<Statement *>() );
    133137        IfStmt( const IfStmt &other );
     138        virtual ~IfStmt();
    134139
    135140        std::list<Statement *> &get_initialization() { return initialization; }
     
    154159        SwitchStmt( Expression *condition, const std::list<Statement *> &statements );
    155160        SwitchStmt( const SwitchStmt &other );
     161        virtual ~SwitchStmt();
    156162
    157163        Expression *get_condition() { return condition; }
     
    175181        CaseStmt( Expression *conditions, const std::list<Statement *> &stmts, bool isdef = false ) throw (SemanticErrorException);
    176182        CaseStmt( const CaseStmt &other );
     183        virtual ~CaseStmt();
    177184
    178185        static CaseStmt * makeDefault( const std::list<Label> & labels = {}, std::list<Statement *> stmts = std::list<Statement *>() );
     
    205212               Statement *body, bool isDoWhile = false );
    206213        WhileStmt( const WhileStmt &other );
     214        virtual ~WhileStmt();
    207215
    208216        Expression *get_condition() { return condition; }
     
    229237             Expression *condition = 0, Expression *increment = 0, Statement *body = 0 );
    230238        ForStmt( const ForStmt &other );
     239        virtual ~ForStmt();
    231240
    232241        std::list<Statement *> &get_initialization() { return initialization; }
     
    246255class BranchStmt : public Statement {
    247256  public:
    248         enum Type { Goto = 0, Break, Continue };
     257        enum Type { Goto = 0, Break, Continue, FallThrough, FallThroughDefault };
    249258
    250259        // originalTarget kept for error messages.
     
    281290        ReturnStmt( Expression *expr );
    282291        ReturnStmt( const ReturnStmt &other );
     292        virtual ~ReturnStmt();
    283293
    284294        Expression *get_expr() { return expr; }
     
    301311        ThrowStmt( Kind kind, Expression * expr, Expression * target = nullptr );
    302312        ThrowStmt( const ThrowStmt &other );
     313        virtual ~ThrowStmt();
    303314
    304315        Kind get_kind() { return kind; }
     
    322333        TryStmt( CompoundStmt *tryBlock, std::list<CatchStmt *> &handlers, FinallyStmt *finallyBlock = 0 );
    323334        TryStmt( const TryStmt &other );
     335        virtual ~TryStmt();
    324336
    325337        CompoundStmt *get_block() const { return block; }
     
    348360                   Expression *cond, Statement *body );
    349361        CatchStmt( const CatchStmt &other );
     362        virtual ~CatchStmt();
    350363
    351364        Kind get_kind() { return kind; }
     
    369382        FinallyStmt( CompoundStmt *block );
    370383        FinallyStmt( const FinallyStmt &other );
     384        virtual ~FinallyStmt();
    371385
    372386        CompoundStmt *get_block() const { return block; }
     
    395409        WaitForStmt();
    396410        WaitForStmt( const WaitForStmt & );
     411        virtual ~WaitForStmt();
    397412
    398413        std::vector<Clause> clauses;
     
    423438        WithStmt( const std::list< Expression * > & exprs, Statement * stmt );
    424439        WithStmt( const WithStmt & other );
     440        virtual ~WithStmt();
    425441
    426442        virtual WithStmt * clone() const override { return new WithStmt( *this ); }
     
    438454        DeclStmt( Declaration *decl );
    439455        DeclStmt( const DeclStmt &other );
     456        virtual ~DeclStmt();
    440457
    441458        Declaration *get_decl() const { return decl; }
     
    459476        ImplicitCtorDtorStmt( Statement * callStmt );
    460477        ImplicitCtorDtorStmt( const ImplicitCtorDtorStmt & other );
     478        virtual ~ImplicitCtorDtorStmt();
    461479
    462480        Statement *get_callStmt() const { return callStmt; }
Note: See TracChangeset for help on using the changeset viewer.