09381cccff
* src/libexpr/expr-to-xml.cc (nix::showAttrs): Add `location' parameter. Provide location XML attributes when it's true. Update callers. (nix::printTermAsXML): Likewise. * src/libexpr/expr-to-xml.hh (nix::printTermAsXML): Update prototype; have `location' default to `false'. * src/nix-instantiate/nix-instantiate.cc (printResult, processExpr): Add `location' parameter; update callers. (run): Add support for `--no-location'. * src/nix-instantiate/help.txt: Update accordingly. * tests/lang.sh: Invoke `nix-instantiate' with `--no-location' for the XML tests. * tests/lang/eval-okay-toxml.exp, tests/lang/eval-okay-to-xml.nix: New files.
17 lines
272 B
C++
17 lines
272 B
C++
#ifndef __EXPR_TO_XML_H
|
|
#define __EXPR_TO_XML_H
|
|
|
|
#include <string>
|
|
#include <map>
|
|
|
|
#include "nixexpr.hh"
|
|
#include "aterm.hh"
|
|
|
|
namespace nix {
|
|
|
|
void printTermAsXML(Expr e, std::ostream & out, PathSet & context, bool location = false);
|
|
|
|
}
|
|
|
|
#endif /* !__EXPR_TO_XML_H */
|