add RandomIfStatement
This commit is contained in:
@@ -8,6 +8,7 @@
|
||||
#include "FunctionDefinition.h"
|
||||
#include "IfStatement.h"
|
||||
#include "ParameterList.h"
|
||||
#include "RandomIfStatement.h"
|
||||
#include "ReturnStatement.h"
|
||||
#include "Scope.h"
|
||||
#include "StatementList.h"
|
||||
@@ -27,6 +28,7 @@ public:
|
||||
virtual void visit(FunctionDefinition* e) = 0;
|
||||
virtual void visit(IfStatement* e) = 0;
|
||||
virtual void visit(ParameterList* e) = 0;
|
||||
virtual void visit(RandomIfStatement* e) = 0;
|
||||
virtual void visit(ReturnStatement* e) = 0;
|
||||
virtual void visit(Scope* e) = 0;
|
||||
virtual void visit(StatementList* e) = 0;
|
||||
|
||||
22
inc/AST/RandomIfStatement.h
Normal file
22
inc/AST/RandomIfStatement.h
Normal file
@@ -0,0 +1,22 @@
|
||||
#ifndef RANDOMIFSTATEMENT_H
|
||||
#define RANDOMIFSTATEMENT_H
|
||||
|
||||
#include "AST/Expression.h"
|
||||
#include "AST/Statement.h"
|
||||
|
||||
class RandomIfStatement : public Statement
|
||||
{
|
||||
public:
|
||||
RandomIfStatement(Expression* prob, Statement* stmt);
|
||||
virtual ~RandomIfStatement();
|
||||
|
||||
virtual void accept(ASTVisitor *visitor);
|
||||
|
||||
Expression* getProb();
|
||||
Statement* getStmt();
|
||||
private:
|
||||
Expression* prob_;
|
||||
Statement* stmt_;
|
||||
};
|
||||
|
||||
#endif // RANDOMIFSTATEMENT_H
|
||||
Reference in New Issue
Block a user