blob: 737b28751661e27f3eb863e3f0e3435f164e4c0d (
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
|
/*
* PostfixExpression.cpp
*
* Created on: Dec 5, 2012
* Author: attero
*/
#include "PostfixExpression.h"
PostfixExpression::PostfixExpression(std::string name, Context * context):
context(context), name(name), native(false), type("PostfixExpression")
{
}
PostfixExpression::~PostfixExpression() {
for(auto i = arguments.begin(); i != arguments.end();)
{
delete *i;
i = arguments.erase(i);
}
}
void PostfixExpression::set_name(std::string name)
{
this->name = name;
}
void PostfixExpression::add_argument(ASTExpression * expression)
{
arguments.push_back(expression);
}
SenchaObject PostfixExpression::evaluate()
{
return context->execute_native_function(name, arguments);
}
void PostfixExpression::execute() {
context->execute_native_function(name, arguments);
}
|