summaryrefslogtreecommitdiff
path: root/src/builtin.cc
diff options
context:
space:
mode:
authorMarius Kintel <marius@kintel.net>2013-04-24 13:17:25 (GMT)
committerMarius Kintel <marius@kintel.net>2013-04-26 21:45:03 (GMT)
commit9b740b558dd627412e01a3521d5372d95e294af2 (patch)
treef34ebfa719303629e27d5fe84c177b5ac38adfbe /src/builtin.cc
parent9a297ecee57549a4eb3919bde4f7b41a548724de (diff)
Further refactoring of scope/context mechanisms. Mostly related to the new FileContext class. Not quite there yet, but almost
Diffstat (limited to 'src/builtin.cc')
-rw-r--r--src/builtin.cc16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/builtin.cc b/src/builtin.cc
index a8b60df..e116f17 100644
--- a/src/builtin.cc
+++ b/src/builtin.cc
@@ -16,12 +16,12 @@ Builtins *Builtins::instance(bool erase)
void Builtins::init(const char *name, class AbstractModule *module)
{
- Builtins::instance()->rootmodule.scope.modules[name] = module;
+ Builtins::instance()->globalscope.modules[name] = module;
}
void Builtins::init(const char *name, class AbstractFunction *function)
{
- Builtins::instance()->rootmodule.scope.functions[name] = function;
+ Builtins::instance()->globalscope.functions[name] = function;
}
extern void register_builtin_functions();
@@ -80,18 +80,18 @@ std::string Builtins::isDeprecated(const std::string &name)
Builtins::Builtins()
{
- this->rootmodule.scope.assignments.push_back(Assignment("$fn", new Expression(Value(0.0))));
- this->rootmodule.scope.assignments.push_back(Assignment("$fs", new Expression(Value(2.0))));
- this->rootmodule.scope.assignments.push_back(Assignment("$fa", new Expression(Value(12.0))));
- this->rootmodule.scope.assignments.push_back(Assignment("$t", new Expression(Value(0.0))));
+ this->globalscope.assignments.push_back(Assignment("$fn", new Expression(Value(0.0))));
+ this->globalscope.assignments.push_back(Assignment("$fs", new Expression(Value(2.0))));
+ this->globalscope.assignments.push_back(Assignment("$fa", new Expression(Value(12.0))));
+ this->globalscope.assignments.push_back(Assignment("$t", new Expression(Value(0.0))));
Value::VectorType zero3;
zero3.push_back(Value(0.0));
zero3.push_back(Value(0.0));
zero3.push_back(Value(0.0));
Value zero3val(zero3);
- this->rootmodule.scope.assignments.push_back(Assignment("$vpt", new Expression(zero3val)));
- this->rootmodule.scope.assignments.push_back(Assignment("$vpr", new Expression(zero3val)));
+ this->globalscope.assignments.push_back(Assignment("$vpt", new Expression(zero3val)));
+ this->globalscope.assignments.push_back(Assignment("$vpr", new Expression(zero3val)));
}
Builtins::~Builtins()
contact: Jan Huwald // Impressum