Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • translator/SynTree/Statement.cc

    rc11e31c r51b73452  
    1414
    1515
     16// *** Statement
    1617Statement::Statement(std::list<Label> _labels):
    1718    labels(_labels) {}
     
    2122Statement::~Statement() {}
    2223
     24//*** ExprStmt
    2325ExprStmt::ExprStmt( std::list<Label> _labels, Expression *_expr ):
    2426    Statement(_labels), expr(_expr) {}
     
    3133}
    3234
     35//*** BranchStmt
    3336const char *BranchStmt::brType[] = { "Goto", "Break", "Continue" };
    3437
     
    5457}
    5558
     59//*** ReturnStmt
    5660ReturnStmt::ReturnStmt( std::list<Label> labels, Expression *_expr, bool throwP ) :
    5761    Statement( labels ), expr( _expr ), isThrow( throwP ) {}
     
    6872
    6973
     74// *** IfStmt
    7075IfStmt::IfStmt( std::list<Label> _labels, Expression *_condition, Statement *_thenPart, Statement *_elsePart ):
    7176    Statement(_labels), condition(_condition), thenPart(_thenPart), elsePart(_elsePart) {}
     
    8691}
    8792
     93// *** SwitchStmt
    8894SwitchStmt::SwitchStmt(std::list<Label> _labels, Expression * _condition, std::list<Statement *> &_branches):
    8995    Statement(_labels), condition(_condition), branches(_branches)
     
    110116}
    111117
     118// *** CaseStmt
    112119CaseStmt::CaseStmt( std::list<Label> _labels, Expression *_condition,
    113120                                        std::list<Statement *> &_statements, bool deflt )
     
    140147}
    141148
     149//*** ChooseStmt
    142150//ChooseStmt::ChooseStmt( std::list<Label> labels, Expression *condition, Statement *body ) {}
    143151ChooseStmt::ChooseStmt(std::list<Label> _labels, Expression * _condition, std::list<Statement *> &_branches):
     
    164172}
    165173
     174//*** FallthruStmt
    166175void FallthruStmt::print(std::ostream &os, int indent) {
    167176    os << "\r" << string(indent, ' ') << "Fall-through statement" << endl;
    168177}
    169178
     179//*** WhileStmt
    170180WhileStmt::WhileStmt( std::list<Label> labels, Expression *condition_,
    171181                                            Statement *body_, bool isDoWhile_ ):
     
    186196}
    187197
     198//*** ForStmt
    188199ForStmt::ForStmt( std::list<Label> labels, Statement *initialization_,
    189200                                    Expression *condition_, Expression *increment_, Statement *body_ ):
     
    222233}
    223234
     235//*** TryStmt
    224236TryStmt::TryStmt( std::list<Label> labels, CompoundStmt *tryBlock, std::list<Statement *> &_handlers, FinallyStmt *_finallyBlock ) :
    225237    Statement( labels ), block( tryBlock ),  handlers( _handlers ), finallyBlock( _finallyBlock )
     
    254266}
    255267
     268//*** CatchStmt
    256269CatchStmt::CatchStmt( std::list<Label> labels, Declaration *_decl, Statement *_body, bool isCatchRest ) :
    257270    Statement( labels ), decl ( _decl ), body( _body ), catchRest ( isCatchRest )
     
    277290
    278291
     292//*** FinallyStmt
    279293FinallyStmt::FinallyStmt( std::list<Label> labels, CompoundStmt *_block ) :
    280294    Statement( labels ), block( _block )
     
    293307}
    294308
     309//*** NullStmt
    295310NullStmt::NullStmt( std::list<Label> labels ) : CompoundStmt( labels ) {}
    296311NullStmt::NullStmt() : CompoundStmt( std::list<Label>() ) {}
Note: See TracChangeset for help on using the changeset viewer.