about summary refs log tree commit diff stats
path: root/cpp/literate/011load
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2015-02-18 14:46:30 -0800
committerKartik K. Agaram <vc@akkartik.com>2015-02-18 14:46:30 -0800
commit9fc64bbc95bb4e55f28f5262d0f5c660177f0a19 (patch)
tree966c29138ee7297b305995168dc3293d11e1cfd4 /cpp/literate/011load
parent96ac511e9e789dfe0dd16e5216b7a957338fe3d3 (diff)
downloadmu-9fc64bbc95bb4e55f28f5262d0f5c660177f0a19.tar.gz
781 - first instruction to run in literate C++ version
Diffstat (limited to 'cpp/literate/011load')
-rw-r--r--cpp/literate/011load5
1 files changed, 3 insertions, 2 deletions
diff --git a/cpp/literate/011load b/cpp/literate/011load
index 4bc73365..f2855e5f 100644
--- a/cpp/literate/011load
+++ b/cpp/literate/011load
@@ -9,7 +9,7 @@ recipe main [
 +parse:   product: {name: "1", type: 1}
 
 :(code)
-void add_recipe(string form) {
+int add_recipe(string form) {
   istringstream in(form);
   in >> std::noskipws;
 
@@ -29,8 +29,9 @@ void add_recipe(string form) {
 
   instruction curr;
   while (next_instruction(in, &curr)) {
-    Recipe[r].step.push_back(curr);
+    Recipe[r].steps.push_back(curr);
   }
+  return r;
 }
 
 bool next_instruction(istream& in, instruction* curr) {