diff options
author | Giles Bathgate <gilesbathgate@gmail.com> | 2011-02-05 15:50:39 (GMT) |
---|---|---|
committer | Giles Bathgate <gilesbathgate@gmail.com> | 2011-02-05 16:37:30 (GMT) |
commit | 744367fda10a756de7da503ff833fe3d75bd3dfc (patch) | |
tree | 2c17b206b27f0821c1a5de444c52bd75d354c60a /src/context.h | |
parent | 1bc4fe5d4d7d12e9d1777221780c2ad6551aa9b0 (diff) |
Proof of concept implementation of builtin constants.
Diffstat (limited to 'src/context.h')
-rw-r--r-- | src/context.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/context.h b/src/context.h index d5be745..cbb1c4f 100644 --- a/src/context.h +++ b/src/context.h @@ -9,6 +9,7 @@ class Context { public: const Context *parent; + QHash<QString, Value> constants; QHash<QString, Value> variables; QHash<QString, Value> config_variables; const QHash<QString, class AbstractFunction*> *functions_p; @@ -27,6 +28,8 @@ public: void set_variable(QString name, Value value); Value lookup_variable(QString name, bool silent = false) const; + void set_constant(QString name, Value value); + QString get_absolute_path(const QString &filename) const; Value evaluate_function(QString name, const QVector<QString> &argnames, const QVector<Value> &argvalues) const; |