summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--project2/common/variables.cpp5
-rw-r--r--project2/common/variables.h1
2 files changed, 6 insertions, 0 deletions
diff --git a/project2/common/variables.cpp b/project2/common/variables.cpp
index 29e694a..591a03e 100644
--- a/project2/common/variables.cpp
+++ b/project2/common/variables.cpp
@@ -124,6 +124,11 @@ Variable::makeParent(const Glib::ustring & name, bool attr, unsigned int dep)
{
return Variable(new VariableParent(name, attr, dep));
}
+Variable
+Variable::fromScriptNode(ScriptNodePtr p)
+{
+ return p->variable();
+}
INSTANTIATESTORE(std::string, VariableLoader);
diff --git a/project2/common/variables.h b/project2/common/variables.h
index 7e9da3d..e0f1e00 100644
--- a/project2/common/variables.h
+++ b/project2/common/variables.h
@@ -33,6 +33,7 @@ class Variable {
Variable(VariableType def);
static Variable makeParent(const Glib::ustring & name, bool attr, unsigned int depth);
+ static Variable fromScriptNode(ScriptNodePtr);
VariableType operator()(ExecContext * ec) const { return var->value(ec); }
Variable & operator=(const VariableType &);