summaryrefslogtreecommitdiff
path: root/module.cc
diff options
context:
space:
mode:
Diffstat (limited to 'module.cc')
-rw-r--r--module.cc9
1 files changed, 3 insertions, 6 deletions
diff --git a/module.cc b/module.cc
index e58cdd1..a319e1e 100644
--- a/module.cc
+++ b/module.cc
@@ -117,6 +117,9 @@ AbstractNode *Module::evaluate(const Context *ctx, const ModuleInstantiation *in
Context c(ctx);
c.args(argnames, argexpr, inst->argnames, inst->argvalues);
+ c.inst_p = inst;
+ c.set_variable("$children", Value(double(inst->children.size())));
+
c.functions_p = &functions;
c.modules_p = &modules;
@@ -131,12 +134,6 @@ AbstractNode *Module::evaluate(const Context *ctx, const ModuleInstantiation *in
node->children.append(n);
}
- foreach(ModuleInstantiation *v, inst->children) {
- AbstractNode *n = v->evaluate(inst->ctx);
- if (n != NULL)
- node->children.append(n);
- }
-
return node;
}
contact: Jan Huwald // Impressum