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

28 lines
790 B
C
Raw Normal View History

2012-12-05 19:32:43 +00:00
/*
* 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"; }
2012-12-05 19:32:43 +00:00
virtual ~ConstantExpression();
virtual SenchaObject evaluate();
2012-12-05 19:32:43 +00:00
};
#endif /* CONSTANTEXPRESSION_H_ */