mirror of
https://github.com/NixOS/nix
synced 2025-06-27 16:51:15 +02:00
Merge pull request #8566 from inclyc/nixd/value-print-depth
libexpr: extend `Value::print` to allow limited depth
This commit is contained in:
commit
7b39a388b3
3 changed files with 251 additions and 10 deletions
|
@ -2,6 +2,7 @@
|
|||
///@file
|
||||
|
||||
#include <cassert>
|
||||
#include <climits>
|
||||
|
||||
#include "symbol-table.hh"
|
||||
#include "value/context.hh"
|
||||
|
@ -137,11 +138,11 @@ private:
|
|||
|
||||
friend std::string showType(const Value & v);
|
||||
|
||||
void print(const SymbolTable & symbols, std::ostream & str, std::set<const void *> * seen) const;
|
||||
void print(const SymbolTable &symbols, std::ostream &str, std::set<const void *> *seen, int depth) const;
|
||||
|
||||
public:
|
||||
|
||||
void print(const SymbolTable & symbols, std::ostream & str, bool showRepeated = false) const;
|
||||
void print(const SymbolTable &symbols, std::ostream &str, bool showRepeated = false, int depth = INT_MAX) const;
|
||||
|
||||
// Functions needed to distinguish the type
|
||||
// These should be removed eventually, by putting the functionality that's
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue