/*
 * VariableExpression.h
 *
 *  Created on: Dec 17, 2012
 *      Author: att
 */

#ifndef VARIABLEEXPRESSION_H_
#define VARIABLEEXPRESSION_H_
#include <iostream>
#include <string>
#include "../ContextManager.h"
#include "ASTExpression.h"

/**
 * VariableExpression is actually a wrapper around name and appropriate context
 * variable can evaluate itself in right time. It's an abstraction of variable.
 */
class VariableExpression: public ASTExpression {
public:
	VariableExpression();
	VariableExpression(std::string name, ContextManager * context);

	ContextManager * context_manager;
	std::string name;
	std::string name_of_context;
	SenchaObject execute();
	SenchaObject evaluate();
	virtual ~VariableExpression();
};

#endif /* VARIABLEEXPRESSION_H_ */
