/* * ConstantExpression.h * * Created on: Dec 5, 2012 * Author: attero */ #ifndef CONSTANTEXPRESSION_H_ #define CONSTANTEXPRESSION_H_ #include "ASTExpression.h" class ConstantExpression : public ASTExpression { public: ConstantExpression(ASTNode * parent); ConstantExpression(ASTNode * parent, int number) { this->parent = parent; value = SenchaObject(number);}; ConstantExpression(ASTNode * parent, double number) {this->parent = parent; value = SenchaObject(number); }; ConstantExpression(std::string text){ this->parent = parent; value = SenchaObject(text);}; SenchaObject value; std::string debug() { return "Constant expression:\n" + value.repr() + "\n"; } virtual ~ConstantExpression(); virtual SenchaObject evaluate(); }; #endif /* CONSTANTEXPRESSION_H_ */