summaryrefslogtreecommitdiff
path: root/src/localscope.cc
diff options
context:
space:
mode:
authorMarius Kintel <marius@kintel.net>2013-06-13 14:29:39 (GMT)
committerMarius Kintel <marius@kintel.net>2013-06-13 14:29:39 (GMT)
commitb45a93aad28a6764aa9aa56d27ffb716353dc27c (patch)
tree747cffce89dab5a4038d2467dfe2fae339bdb5fe /src/localscope.cc
parent2a8f188fca3476dd07222585237d3afbc2e7b6be (diff)
Related to #399, reverted assignment evaluation order to be the same as in 2013.01 as the new implementation broke existing scripts. Added some experimental commented out code, which can be used as reference in the future
Diffstat (limited to 'src/localscope.cc')
-rw-r--r--src/localscope.cc8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/localscope.cc b/src/localscope.cc
index eecff91..dd40563 100644
--- a/src/localscope.cc
+++ b/src/localscope.cc
@@ -55,9 +55,11 @@ std::vector<AbstractNode*> LocalScope::instantiateChildren(const Context *evalct
// c->functions_p = &this->functions;
// c->modules_p = &this->modules;
- BOOST_FOREACH (const Assignment &ass, this->assignments) {
- c->set_variable(ass.first, ass.second->evaluate(c));
- }
+ // Uncommenting the following would allow assignments in local scopes,
+ // but would cause duplicate evaluation of module scopes
+ // BOOST_FOREACH (const Assignment &ass, this->assignments) {
+ // c->set_variable(ass.first, ass.second->evaluate(c));
+ // }
}
std::vector<AbstractNode*> childnodes;
contact: Jan Huwald // Impressum