30 lines
562 B
C
30 lines
562 B
C
![]() |
/*
|
||
|
* BasicExpression.h
|
||
|
*
|
||
|
* Created on: Dec 5, 2012
|
||
|
* Author: attero
|
||
|
*/
|
||
|
|
||
|
#ifndef BASICEXPRESSION_H_
|
||
|
#define BASICEXPRESSION_H_
|
||
|
#include "ASTExpression.h"
|
||
|
#include <string>
|
||
|
|
||
|
class BasicExpression : public ASTExpression {
|
||
|
public:
|
||
|
//TODO change oper to enum
|
||
|
std::string oper;
|
||
|
ASTExpression * left;
|
||
|
ASTExpression * right;
|
||
|
|
||
|
void set_operator(std::string op);
|
||
|
void set_left_operand(ASTNode * left);
|
||
|
void set_right_operand(ASTNode * right);
|
||
|
virtual int evaluate();
|
||
|
|
||
|
BasicExpression();
|
||
|
virtual ~BasicExpression();
|
||
|
};
|
||
|
|
||
|
#endif /* BASICEXPRESSION_H_ */
|