summaryrefslogtreecommitdiff
path: root/expr.h
diff options
context:
space:
mode:
Diffstat (limited to 'expr.h')
-rw-r--r--expr.h28
1 files changed, 16 insertions, 12 deletions
diff --git a/expr.h b/expr.h
index 4e415496..c81a24df 100644
--- a/expr.h
+++ b/expr.h
@@ -93,18 +93,22 @@ public:
str = txt;
}
- void parse(const string& _str, const unsigned int flags = 0);
- void parse(std::istream& in, const unsigned int flags = 0);
-
- void compile(scope_t& scope);
- value_t calc(scope_t& scope) const;
-
- void print(std::ostream& out, scope_t& scope) const;
- void dump(std::ostream& out) const;
-
- void read(std::ostream& in);
- void read(const char *& data);
- void write(std::ostream& out) const;
+ void parse(const string& _str, const unsigned int flags = 0);
+ void parse(std::istream& in, const unsigned int flags = 0);
+
+ void compile(scope_t& scope);
+ value_t calc(scope_t& scope) const;
+
+ bool is_constant() const;
+ value_t& constant_value();
+ const value_t& constant_value() const;
+
+ void print(std::ostream& out, scope_t& scope) const;
+ void dump(std::ostream& out) const;
+
+ void read(std::ostream& in);
+ void read(const char *& data);
+ void write(std::ostream& out) const;
static value_t eval(const string& _expr, scope_t& scope);
};