summaryrefslogtreecommitdiffstats
path: root/Sencha-lang/AST/DeclarationStatement.h
blob: 573dc389b2be7276c6c6c429b83dee5e690fa2d1 (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
34
35
36
37
38
39
/*
 * DeclarationStatement.h
 *
 *  Created on: Dec 9, 2012
 *      Author: attero
 */

#ifndef DECLARATIONSTATEMENT_H_
#define DECLARATIONSTATEMENT_H_

#include "ASTStatement.h"
#include "ASTExpression.h"
#include "ConstantExpression.h"
#include "../Context.h"


class DeclarationStatement: public ASTStatement {
public:
	std::string name;
	Context * context;
	SenchaObject right_value;
	ASTStatement * body;
	std::vector<std::string> arguments;
	bool is_function;

	void add_right_value(ASTExpression * right);
	DeclarationStatement(ASTNode * parent, Context * context);
	virtual std::string debug();
	void add_name(std::string);


	void add_argument(std::string name);
	void add_body(ASTStatement * statement);

	virtual void execute();
	virtual ~DeclarationStatement();
};

#endif /* DECLARATIONSTATEMENT_H_ */