From d4f0b0fc6cdb9ae2fd5fc057d621bc80b36a7b18 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Mon, 12 Apr 2010 22:03:27 +0000 Subject: * Indented strings. --- src/libexpr/nixexpr.hh | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'src/libexpr/nixexpr.hh') 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); -- cgit v1.2.3