summaryrefslogtreecommitdiffstats
path: root/Sencha-lang/Elements/SenchaFunction.cpp
diff options
context:
space:
mode:
authorJustyna Ilczuk <justyna.ilczuk@gmail.com>2012-12-31 17:10:37 +0100
committerJustyna Ilczuk <justyna.ilczuk@gmail.com>2012-12-31 17:10:37 +0100
commit6296524bec2e2254f816b944ecc8cf28686f1fa8 (patch)
tree69b4f25c77502cd4fbcd14c28a9ad04aac28acd3 /Sencha-lang/Elements/SenchaFunction.cpp
parente01bc95615b24e8e122942f3701b6b4197ec16b7 (diff)
downloadsencha-lang-6296524bec2e2254f816b944ecc8cf28686f1fa8.tar.gz
sencha-lang-6296524bec2e2254f816b944ecc8cf28686f1fa8.tar.bz2
sencha-lang-6296524bec2e2254f816b944ecc8cf28686f1fa8.tar.xz
sencha-lang-6296524bec2e2254f816b944ecc8cf28686f1fa8.zip
Functions work if given right arguments ^^.
Diffstat (limited to 'Sencha-lang/Elements/SenchaFunction.cpp')
-rw-r--r--Sencha-lang/Elements/SenchaFunction.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/Sencha-lang/Elements/SenchaFunction.cpp b/Sencha-lang/Elements/SenchaFunction.cpp
index a18bc27..df681db 100644
--- a/Sencha-lang/Elements/SenchaFunction.cpp
+++ b/Sencha-lang/Elements/SenchaFunction.cpp
@@ -7,8 +7,8 @@
#include "SenchaFunction.h"
-SenchaFunction::SenchaFunction(std::string name, std::vector<std::string> names_of_arguments, ASTNode * body, ContextManager * context)
- : name(name), names_of_arguments(names_of_arguments), body(body), context(context)
+SenchaFunction::SenchaFunction(std::string name, std::vector<std::string> names_of_arguments, ASTNode * body)
+ : name(name), names_of_arguments(names_of_arguments), body(body)
{
}
@@ -17,3 +17,7 @@ SenchaFunction::~SenchaFunction() {
}
+SenchaObject SenchaFunction::operator()()
+{
+ return body->execute();
+}