summaryrefslogtreecommitdiffstats
path: root/Sencha-lang/AST/DeclarationStatement.cpp
blob: 241120a50c22b74303e644e4ccb81595f64b641a (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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
/*
 * DeclarationStatement.cpp
 *
 *  Created on: Dec 9, 2012
 *      Author: attero
 */

#include "DeclarationStatement.h"



DeclarationStatement::~DeclarationStatement() {
	// TODO Auto-generated destructor stub
}

void DeclarationStatement::add_right_value(ASTExpression * right)
{

}

DeclarationStatement::DeclarationStatement(ASTNode * parent, Context * context)
{
	is_function = false;
	body = NULL;
}

std::string DeclarationStatement::debug()
{
	std::string debug_note = "Declaration";
	return debug_note;
}

void DeclarationStatement::add_name(std::string name)
{
	this->name = name;
}


void DeclarationStatement::add_argument(std::string name)
{
	arguments.push_back(name);
}

void DeclarationStatement::execute()
{
	if(is_function)
	{
		//TODO implement
		//do function registering stuff
	}
	else
	{

	}
}

void DeclarationStatement::add_body(ASTStatement * statement)
{
	is_function = true;
	body = statement;
}