Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/AST/Stmt.hpp

    r675d816 r94b1f718  
    9696};
    9797
     98/// Assembly statement `asm ... ( "..." : ... )`
    9899class AsmStmt final : public Stmt {
    99100public:
     
    118119};
    119120
     121/// C-preprocessor directive `#...`
    120122class DirectiveStmt final : public Stmt {
    121123public:
     
    132134};
    133135
     136/// If conditional statement `if (...) ... else ...`
    134137class IfStmt final : public Stmt {
    135138public:
     
    151154};
    152155
     156/// Switch or choose conditional statement `switch (...) { ... }`
    153157class SwitchStmt final : public Stmt {
    154158public:
     
    166170};
    167171
     172/// Case label `case ...:` `default:`
    168173class CaseStmt final : public Stmt {
    169174public:
     
    183188};
    184189
     190/// While loop `while (...) ...` `do ... while (...);
    185191class WhileStmt final : public Stmt {
    186192public:
     
    201207};
    202208
     209/// For loop `for (... ; ... ; ...) ...`
    203210class ForStmt final : public Stmt {
    204211public:
     
    219226};
    220227
     228/// Branch control flow statement `goto ...` `break` `continue` `fallthru`
    221229class BranchStmt final : public Stmt {
    222230public:
     
    236244          computedTarget(computedTarget), kind(Goto) {}
    237245
    238         const char * kindName() { return kindNames[kind]; }
     246        const char * kindName() const { return kindNames[kind]; }
    239247
    240248        const Stmt * accept( Visitor & v ) const override { return v.visit( this ); }
     
    246254};
    247255
     256/// Return statement `return ...`
    248257class ReturnStmt final : public Stmt {
    249258public:
     
    259268};
    260269
     270/// Throw statement `throw ...`
    261271class ThrowStmt final : public Stmt {
    262272public:
     
    277287};
    278288
     289/// Try statement `try { ... } ...`
    279290class TryStmt final : public Stmt {
    280291public:
     
    294305};
    295306
     307/// Catch clause of try statement
    296308class CatchStmt final : public Stmt {
    297309public:
     
    313325};
    314326
     327/// Finally clause of try statement
    315328class FinallyStmt final : public Stmt {
    316329public:
     
    327340};
    328341
     342/// Wait for concurrency statement `when (...) waitfor (... , ...) ... timeout(...) ... else ...`
    329343class WaitForStmt final : public Stmt {
    330344public:
    331345        struct Target {
    332                 ptr<Expr> function;
    333                 std::vector<ptr<Expr>> arguments;
     346                ptr<Expr> func;
     347                std::vector<ptr<Expr>> args;
    334348        };
    335349
     
    364378};
    365379
     380/// With statement `with (...) ...`
    366381class WithStmt final : public Stmt {
    367382public:
     
    379394};
    380395
     396/// Any declaration in a (compound) statement.
    381397class DeclStmt final : public Stmt {
    382398public:
     
    392408};
    393409
     410/// Represents an implicit application of a constructor or destructor.
    394411class ImplicitCtorDtorStmt final : public Stmt {
    395412public:
Note: See TracChangeset for help on using the changeset viewer.