2013-06-01 01:22:04 +02:00
|
|
|
#ifndef BINOP_H
|
|
|
|
|
#define BINOP_H
|
|
|
|
|
|
|
|
|
|
#include <string>
|
|
|
|
|
#include "AST/Expression.h"
|
|
|
|
|
|
2013-06-01 03:18:46 +02:00
|
|
|
class BinOpExpression : public Expression {
|
2013-06-01 01:22:04 +02:00
|
|
|
public:
|
2013-06-01 03:18:46 +02:00
|
|
|
BinOpExpression(Expression* leftExp ,std::string op, Expression* rightExp);
|
|
|
|
|
virtual ~BinOpExpression();
|
2013-06-01 01:22:04 +02:00
|
|
|
|
|
|
|
|
std::string getOp();
|
|
|
|
|
Expression* getLeftExp();
|
|
|
|
|
Expression* getRightExp();
|
|
|
|
|
virtual void accept(ASTVisitor* visitor);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
std::string op_;
|
|
|
|
|
Expression* leftExp_;
|
|
|
|
|
Expression* rightExp_;
|
|
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
#endif // BINOP_H
|