diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2017-05-20 02:09:58 -0700 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2017-05-20 02:09:58 -0700 |
commit | 14d6f9f39553dc93a27152c66e81afba221c92fa (patch) | |
tree | a02ac465c80ae51df61ea1cb7f0ce8f07f56fd72 /010vm.cc | |
parent | 7f5600570a24fadb07015ad1b78b1989a8d364f2 (diff) | |
download | mu-14d6f9f39553dc93a27152c66e81afba221c92fa.tar.gz |
3872
Starting to look for lack of organization in the edit/ app.
Diffstat (limited to '010vm.cc')
-rw-r--r-- | 010vm.cc | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/010vm.cc b/010vm.cc index 528436c6..2dddf9ee 100644 --- a/010vm.cc +++ b/010vm.cc @@ -603,6 +603,20 @@ string to_string(const recipe& r) { return out.str(); } +string to_original_string(const recipe& r) { + ostringstream out; + out << "recipe " << r.name << " [\n"; + for (int i = 0; i < SIZE(r.steps); ++i) { + const instruction& inst = r.steps.at(i); + if (inst.original_string.empty()) + out << " " << to_original_string(r.steps.at(i)) << '\n'; + else + out << " " << r.steps.at(i).original_string << '\n'; + } + out << "]\n"; + return out.str(); +} + string debug_string(const recipe& x) { ostringstream out; out << "- recipe " << x.name << '\n'; |