summaryrefslogtreecommitdiffstats
path: root/Sencha-lang/AST/VariableExpression.h
blob: add5190882143d0ff08baeaab376dd1879aa094c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
/*
 * VariableExpression.h
 *
 *  Created on: Dec 17, 2012
 *      Author: att
 */

#ifndef VARIABLEEXPRESSION_H_
#define VARIABLEEXPRESSION_H_
#include <iostream>
#include <string>
#include "../Context.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, Context * context);

	Context * context;
	std::string name;

	void execute();
	void execute_quietly();
	SenchaObject evaluate();
	virtual ~VariableExpression();
};

#endif /* VARIABLEEXPRESSION_H_ */