sencha-lang/Sencha-lang/AST/BasicExpression.h

35 lines
611 B
C
Raw Normal View History

2012-12-05 19:32:43 +00:00
/*
* BasicExpression.h
*
* Created on: Dec 5, 2012
* Author: attero
*/
#ifndef BASICEXPRESSION_H_
#define BASICEXPRESSION_H_
#include "ASTExpression.h"
class BasicExpression : public ASTExpression {
public:
//TODO change oper to enum
2012-12-06 17:41:16 +00:00
2012-12-05 19:32:43 +00:00
std::string oper;
2012-12-06 17:41:16 +00:00
bool children_set;
2012-12-05 19:32:43 +00:00
void set_operator(std::string op);
void set_left_operand(ASTNode * left);
void set_right_operand(ASTNode * right);
virtual SenchaObject evaluate();
2012-12-06 17:41:16 +00:00
virtual void execute() { evaluate(); };
2012-12-05 19:32:43 +00:00
2012-12-06 17:41:16 +00:00
std::string debug() ;
BasicExpression(ASTNode * parent);
2012-12-05 19:32:43 +00:00
virtual ~BasicExpression();
};
#endif /* BASICEXPRESSION_H_ */