diff options
-rw-r--r-- | 020run.cc | 4 | ||||
-rw-r--r-- | 026call.cc | 5 |
2 files changed, 9 insertions, 0 deletions
diff --git a/020run.cc b/020run.cc index 8f27c820..eae5549c 100644 --- a/020run.cc +++ b/020run.cc @@ -122,6 +122,10 @@ const string& current_recipe_name() { return get(Recipe, Current_routine->running_recipe).name; } +const recipe& current_recipe() { + return get(Recipe, Current_routine->running_recipe); +} + const instruction& current_instruction() { return get(Recipe, Current_routine->running_recipe).steps.at(Current_routine->running_step_index); } diff --git a/026call.cc b/026call.cc index 8a781892..afe0bc19 100644 --- a/026call.cc +++ b/026call.cc @@ -84,6 +84,11 @@ const string& current_recipe_name() { assert(!Current_routine->calls.empty()); return get(Recipe, current_call().running_recipe).name; } +:(replace{} "const recipe& current_recipe()") +const recipe& current_recipe() { + assert(!Current_routine->calls.empty()); + return get(Recipe, current_call().running_recipe); +} :(replace{} "const instruction& current_instruction()") const instruction& current_instruction() { assert(!Current_routine->calls.empty()); |