diff options
author | Marius Kintel <marius@kintel.net> | 2013-04-19 21:52:01 (GMT) |
---|---|---|
committer | Marius Kintel <marius@kintel.net> | 2013-04-26 21:45:03 (GMT) |
commit | 9a297ecee57549a4eb3919bde4f7b41a548724de (patch) | |
tree | b1f523e93f528559e9ada2d38d76be7a0362f9d4 /src/builtin.cc | |
parent | b4568a09df8be0f212ba1c4fd1660459900e3cf0 (diff) |
Refactoring: Split out FileModule from Module, Added LocalScope renamed some confusing 'evaluate' methods to 'instantiate', added FileContext (not yet used)
Diffstat (limited to 'src/builtin.cc')
-rw-r--r-- | src/builtin.cc | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/builtin.cc b/src/builtin.cc index 37abde6..a8b60df 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.modules[name] = module; + Builtins::instance()->rootmodule.scope.modules[name] = module; } void Builtins::init(const char *name, class AbstractFunction *function) { - Builtins::instance()->rootmodule.functions[name] = function; + Builtins::instance()->rootmodule.scope.functions[name] = function; } extern void register_builtin_functions(); @@ -80,18 +80,18 @@ std::string Builtins::isDeprecated(const std::string &name) Builtins::Builtins() { - this->rootmodule.assignments.push_back(Assignment("$fn", new Expression(Value(0.0)))); - this->rootmodule.assignments.push_back(Assignment("$fs", new Expression(Value(2.0)))); - this->rootmodule.assignments.push_back(Assignment("$fa", new Expression(Value(12.0)))); - this->rootmodule.assignments.push_back(Assignment("$t", new Expression(Value(0.0)))); + 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)))); 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.assignments.push_back(Assignment("$vpt", new Expression(zero3val))); - this->rootmodule.assignments.push_back(Assignment("$vpr", new Expression(zero3val))); + this->rootmodule.scope.assignments.push_back(Assignment("$vpt", new Expression(zero3val))); + this->rootmodule.scope.assignments.push_back(Assignment("$vpr", new Expression(zero3val))); } Builtins::~Builtins() |