summaryrefslogtreecommitdiffstats
path: root/Sencha-lang/AST/VariableExpression.cpp
diff options
context:
space:
mode:
authorJustyna Ilczuk <justyna.ilczuk@gmail.com>2013-01-01 23:38:10 +0100
committerJustyna Ilczuk <justyna.ilczuk@gmail.com>2013-01-01 23:38:10 +0100
commit0992a3a67db500c2ed88218e47043482ab3829ac (patch)
treef513fe2ffb79638a11bae505aaa01b63e23e08e8 /Sencha-lang/AST/VariableExpression.cpp
parent7e4ac66f3446f4dc5b871a047400265f0c046952 (diff)
downloadsencha-lang-0992a3a67db500c2ed88218e47043482ab3829ac.tar.gz
sencha-lang-0992a3a67db500c2ed88218e47043482ab3829ac.tar.bz2
sencha-lang-0992a3a67db500c2ed88218e47043482ab3829ac.tar.xz
sencha-lang-0992a3a67db500c2ed88218e47043482ab3829ac.zip
Bug with passing variables to funcitons resolved.
Diffstat (limited to 'Sencha-lang/AST/VariableExpression.cpp')
-rw-r--r--Sencha-lang/AST/VariableExpression.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/Sencha-lang/AST/VariableExpression.cpp b/Sencha-lang/AST/VariableExpression.cpp
index 895e131..22f4465 100644
--- a/Sencha-lang/AST/VariableExpression.cpp
+++ b/Sencha-lang/AST/VariableExpression.cpp
@@ -20,15 +20,17 @@ VariableExpression::~VariableExpression() {
SenchaObject VariableExpression::evaluate()
{
+
auto context = context_manager->get_top();
+ //std::cout << "I'm retrieving variable " + name + " from " + context->name << std::endl;
SenchaObject result = context->get(name);
+ //std::cout << "And it's: " + result.repr() << std::endl;
result.name = name;
return result;
}
SenchaObject VariableExpression::execute()
{
- SenchaObject result = evaluate();
- return result;
+ return evaluate();
}