diff options
author | Eelco Dolstra <e.dolstra@tudelft.nl> | 2006-08-24T14·03+0000 |
---|---|---|
committer | Eelco Dolstra <e.dolstra@tudelft.nl> | 2006-08-24T14·03+0000 |
commit | da25d80152fb6e51fe695dcd2ebaa4e00a7ee646 (patch) | |
tree | 27077c18f3f828d64f260260aa08e84bbe638d04 /src/libexpr/eval.cc | |
parent | 943ab38a0d0969004de231a6b3e89df88ffc6ccf (diff) |
* Strict evaluation and XML printing of lists.
Diffstat (limited to 'src/libexpr/eval.cc')
-rw-r--r-- | src/libexpr/eval.cc | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/libexpr/eval.cc b/src/libexpr/eval.cc index 07f53a56c7bc..703393084dfc 100644 --- a/src/libexpr/eval.cc +++ b/src/libexpr/eval.cc @@ -589,7 +589,6 @@ Expr strictEvalExpr(EvalState & state, Expr e) e = evalExpr(state, e); ATermList as; - if (matchAttrs(e, as)) { ATermList as2 = ATempty; for (ATermIterator i(as); i; ++i) { @@ -599,10 +598,17 @@ Expr strictEvalExpr(EvalState & state, Expr e) } return makeAttrs(ATreverse(as2)); } - + + ATermList es; + if (matchList(e, es)) { + ATermList es2 = ATempty; + for (ATermIterator i(es); i; ++i) + es2 = ATinsert(es2, strictEvalExpr(state, *i)); + return makeList(ATreverse(es2)); + } + ATermList formals; ATerm body, pos; - if (matchFunction(e, formals, body, pos)) { ATermList formals2 = ATempty; |