Merge branch 'master' of git.tuxzone.org:woc2013
Conflicts: inc/AST/ASTVisitor.h
This commit is contained in:
@@ -11,6 +11,8 @@
|
||||
#include "ValueList.h"
|
||||
#include "VariableDefinition.h"
|
||||
#include "ExpressionStatement.h"
|
||||
#include "ReturnStatement.h"
|
||||
|
||||
|
||||
class ASTVisitor {
|
||||
public:
|
||||
@@ -27,6 +29,7 @@ public:
|
||||
virtual void visit(StatementList* e) = 0;
|
||||
virtual void visit(ValueList* e) = 0;
|
||||
virtual void visit(VariableDefinition* e) = 0;
|
||||
virtual void visit(ReturnStatement* e) = 0;
|
||||
};
|
||||
|
||||
#endif // ASTVISITOR_H
|
||||
|
||||
17
inc/AST/ReturnStatement.h
Normal file
17
inc/AST/ReturnStatement.h
Normal file
@@ -0,0 +1,17 @@
|
||||
#ifndef RETURNSTATEMENT_H
|
||||
#define RETURNSTATEMENT_H
|
||||
|
||||
#include "AST/Statement.h"
|
||||
#include "AST/Expression.h"
|
||||
|
||||
class ReturnStatement : public Statement {
|
||||
public:
|
||||
ReturnStatement(Expression* expr);
|
||||
virtual ~ReturnStatement();
|
||||
virtual void accept(ASTVisitor *visitor);
|
||||
Expression* getExpr();
|
||||
private:
|
||||
Expression* expr_;
|
||||
};
|
||||
|
||||
#endif // RETURNSTATEMENT_H
|
||||
Reference in New Issue
Block a user