about summary refs log tree commit diff stats
path: root/subx
diff options
context:
space:
mode:
authorKartik Agaram <vc@akkartik.com>2018-10-01 08:27:37 -0700
committerKartik Agaram <vc@akkartik.com>2018-10-01 08:27:37 -0700
commit83c4fbc91ca5fe08181695264ab9c996593f3897 (patch)
treecb0ffb012b61573da2ffecaa2a2082f321dc0ed2 /subx
parent2813ce0e72568a256a15df342e25bd3622eacaab (diff)
downloadmu-83c4fbc91ca5fe08181695264ab9c996593f3897.tar.gz
4629
Diffstat (limited to 'subx')
-rw-r--r--subx/011run.cc18
1 files changed, 10 insertions, 8 deletions
diff --git a/subx/011run.cc b/subx/011run.cc
index 3c5d7158..05c34508 100644
--- a/subx/011run.cc
+++ b/subx/011run.cc
@@ -198,14 +198,6 @@ void parse_word(const string& data, word& out) {
   }
 }
 
-string to_string(const word& w) {
-  ostringstream out;
-  out << w.data;
-  for (int i = 0;  i < SIZE(w.metadata);  ++i)
-    out << " /" << w.metadata.at(i);
-  return out.str();
-}
-
 //:: transform
 
 :(before "End Types")
@@ -331,7 +323,17 @@ int32_t next32() {
   return result;
 }
 
+//:: helpers
+
 :(code)
+string to_string(const word& w) {
+  ostringstream out;
+  out << w.data;
+  for (int i = 0;  i < SIZE(w.metadata);  ++i)
+    out << " /" << w.metadata.at(i);
+  return out.str();
+}
+
 int32_t parse_int(const string& s) {
   if (s.empty()) return 0;
   istringstream in(s);