1.1 --- a/jitcraft/AST.h Thu Jun 28 00:54:45 2012 -0700
1.2 +++ b/jitcraft/AST.h Thu Jun 28 01:38:56 2012 -0700
1.3 @@ -41,7 +41,9 @@
1.4 _(IfStatement) \
1.5 _(IndexExpression) \
1.6 _(EnumStatement) \
1.7 - _(WhileStatement)
1.8 + _(WhileStatement) \
1.9 + _(BreakStatement) \
1.10 + _(ContinueStatement)
1.11
1.12 // Forward declarations.
1.13 #define _(name) class name;
1.14 @@ -423,6 +425,36 @@
1.15 }
1.16 };
1.17
1.18 +class BreakStatement : public Statement
1.19 +{
1.20 + public:
1.21 + BreakStatement()
1.22 + {
1.23 + }
1.24 +
1.25 + Kind kind() const {
1.26 + return kBreakStatement;
1.27 + }
1.28 + void accept(AstVisitor *visitor) {
1.29 + visitor->visit(this);
1.30 + }
1.31 +};
1.32 +
1.33 +class ContinueStatement : public Statement
1.34 +{
1.35 + public:
1.36 + ContinueStatement()
1.37 + {
1.38 + }
1.39 +
1.40 + Kind kind() const {
1.41 + return kContinueStatement;
1.42 + }
1.43 + void accept(AstVisitor *visitor) {
1.44 + visitor->visit(this);
1.45 + }
1.46 +};
1.47 +
1.48 class Assignment : public Expression
1.49 {
1.50 Expression *lvalue_;