summaryrefslogtreecommitdiffstats
path: root/Sencha-lang/AST/DeclarationStatement.h
blob: cbadafe2a68f5a4fce34ffcc705243c2fc3341ef (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
/*
 * DeclarationStatement.h
 *
 *  Created on: Dec 9, 2012
 *      Author: attero
 */

#ifndef DECLARATIONSTATEMENT_H_
#define DECLARATIONSTATEMENT_H_

#include "ASTStatement.h"
#include "ASTExpression.h"

#include "../Context.h"

class DeclarationStatement: public ASTStatement {
public:
	std::string name;
	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_ */