aboutsummaryrefslogtreecommitdiff
path: root/src/libexpr/nixexpr.hh
diff options
context:
space:
mode:
authorEelco Dolstra <e.dolstra@tudelft.nl>2010-04-12 22:03:27 +0000
committerEelco Dolstra <e.dolstra@tudelft.nl>2010-04-12 22:03:27 +0000
commitd4f0b0fc6cdb9ae2fd5fc057d621bc80b36a7b18 (patch)
treecac761afab880a00b3dced69438e006ca2929114 /src/libexpr/nixexpr.hh
parenta60317f20fbc8be8e339060d932946f6d99ece6a (diff)
* Indented strings.
Diffstat (limited to 'src/libexpr/nixexpr.hh')
-rw-r--r--src/libexpr/nixexpr.hh18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/libexpr/nixexpr.hh b/src/libexpr/nixexpr.hh
index d6e088c41..725f9fe88 100644
--- a/src/libexpr/nixexpr.hh
+++ b/src/libexpr/nixexpr.hh
@@ -35,11 +35,8 @@ struct EvalState;
struct Expr
{
- virtual void show(std::ostream & str) = 0;
- virtual void eval(EvalState & state, Env & env, Value & v)
- {
- throw Error("not implemented");
- }
+ virtual void show(std::ostream & str);
+ virtual void eval(EvalState & state, Env & env, Value & v);
};
std::ostream & operator << (std::ostream & str, Expr & e);
@@ -62,6 +59,13 @@ struct ExprString : Expr
COMMON_METHODS
};
+/* Temporary class used during parsing of indented strings. */
+struct ExprIndStr : Expr
+{
+ string s;
+ ExprIndStr(const string & s) : s(s) { };
+};
+
struct ExprPath : Expr
{
string s;
@@ -206,10 +210,6 @@ struct TermFun
ATerm bottomupRewrite(TermFun & f, ATerm e);
-/* Create an attribute set expression from an Attrs value. */
-Expr makeAttrs(const ATermMap & attrs);
-
-
/* Check whether all variables are defined in the given expression.
Throw an exception if this isn't the case. */
void checkVarDefs(const ATermMap & def, Expr e);