about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--012transform.cc7
-rw-r--r--020run.cc4
2 files changed, 9 insertions, 2 deletions
diff --git a/012transform.cc b/012transform.cc
index a416c20a..0130cd16 100644
--- a/012transform.cc
+++ b/012transform.cc
@@ -56,6 +56,13 @@ void transform_all() {
   // End Transform All
 }
 
+// Later we'll have transforms create recipes out of other recipes. This
+// helper will help ensure we don't lose the new recipes.
+void transform_permanently() {
+  transform_all();
+  Recently_added_recipes.clear();
+}
+
 void parse_int_reagents() {
   trace(9991, "transform") << "--- parsing any uninitialized reagents as integers" << end();
   for (map<recipe_ordinal, recipe>::iterator p = Recipe.begin(); p != Recipe.end(); ++p) {
diff --git a/020run.cc b/020run.cc
index b4810909..41154f06 100644
--- a/020run.cc
+++ b/020run.cc
@@ -137,7 +137,7 @@ inline const vector<instruction>& routine::steps() const {
 //? Trace_file = "interactive";
 //? START_TRACING_UNTIL_END_OF_SCOPE;
 load_permanently("core.mu");
-transform_all();
+transform_permanently();
 //? DUMP("");
 //? exit(0);
 
@@ -156,7 +156,7 @@ if (argc > 1) {
     argv++;
     argc--;
   }
-  transform_all();
+  transform_permanently();
   if (Run_tests) Recipe.erase(get(Recipe_ordinal, "main"));
   // End Loading .mu Files
 }
7f5334d2d2449d6dbdabd86f738'>21a6f553 ^
443bb673 ^






















1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51