diff options
-rw-r--r-- | 012transform.cc | 7 | ||||
-rw-r--r-- | 020run.cc | 4 |
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 } |