mirror of
https://github.com/NixOS/nix
synced 2025-06-25 19:01:16 +02:00
Make source location info in the XML output optional.
* 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.
This commit is contained in:
parent
471419d1fa
commit
09381cccff
7 changed files with 29 additions and 19 deletions
|
@ -9,7 +9,7 @@
|
|||
|
||||
namespace nix {
|
||||
|
||||
void printTermAsXML(Expr e, std::ostream & out, PathSet & context);
|
||||
void printTermAsXML(Expr e, std::ostream & out, PathSet & context, bool location = false);
|
||||
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue