/*
 * 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_ */
