diff options
author | Jannis Harder <me@jix.one> | 2023-01-03 14:45:41 +0100 |
---|---|---|
committer | Jannis Harder <me@jix.one> | 2023-01-11 18:07:16 +0100 |
commit | 636b9f27052ef67192ee55a862c31e57a1ccad79 (patch) | |
tree | 3d9177af1c3360c28a348a982245966b6aa1af00 /kernel/json.h | |
parent | 3e25e61778cc9fe427bf68f45de43f26985b12c3 (diff) | |
download | yosys-636b9f27052ef67192ee55a862c31e57a1ccad79.tar.gz yosys-636b9f27052ef67192ee55a862c31e57a1ccad79.tar.bz2 yosys-636b9f27052ef67192ee55a862c31e57a1ccad79.zip |
Support for BTOR witness to Yosys witness conversion
Diffstat (limited to 'kernel/json.h')
-rw-r--r-- | kernel/json.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/kernel/json.h b/kernel/json.h index ae86b3aa6..c9aa0e045 100644 --- a/kernel/json.h +++ b/kernel/json.h @@ -47,6 +47,7 @@ class PrettyJson std::string newline_indent = "\n"; std::vector<std::unique_ptr<Target>> targets; std::vector<Scope> state = {VALUE}; + int compact_depth = INT_MAX; public: void emit_to_log(); @@ -55,7 +56,9 @@ public: bool active() { return !targets.empty(); } - void line(); + void compact() { compact_depth = GetSize(state); } + + void line(bool space_if_inline = true); void raw(const char *raw_json); void flush(); void begin_object(); |