diff options
Diffstat (limited to '039wait.cc')
-rw-r--r-- | 039wait.cc | 22 |
1 files changed, 17 insertions, 5 deletions
diff --git a/039wait.cc b/039wait.cc index 955ab4a8..b21f92ca 100644 --- a/039wait.cc +++ b/039wait.cc @@ -34,6 +34,10 @@ waiting_on_location = old_value_of_waiting_location = 0; WAIT_FOR_LOCATION, :(before "End Primitive Recipe Numbers") Recipe_ordinal["wait-for-location"] = WAIT_FOR_LOCATION; +:(before "End Primitive Recipe Checks") +case WAIT_FOR_LOCATION: { + break; +} :(before "End Primitive Recipe Implementations") case WAIT_FOR_LOCATION: { reagent loc = canonize(current_instruction().ingredients.at(0)); @@ -88,16 +92,20 @@ waiting_on_routine = 0; WAIT_FOR_ROUTINE, :(before "End Primitive Recipe Numbers") Recipe_ordinal["wait-for-routine"] = WAIT_FOR_ROUTINE; -:(before "End Primitive Recipe Implementations") +:(before "End Primitive Recipe Checks") case WAIT_FOR_ROUTINE: { - if (SIZE(ingredients) != 1) { - raise << maybe(current_recipe_name()) << "'wait-for-routine' requires exactly one ingredient, but got " << current_instruction().to_string() << '\n' << end(); + if (SIZE(inst.ingredients) != 1) { + raise << maybe(Recipe[r].name) << "'wait-for-routine' requires exactly one ingredient, but got " << inst.to_string() << '\n' << end(); break; } - if (!scalar(ingredients.at(0))) { - raise << maybe(current_recipe_name()) << "first ingredient of 'wait-for-routine' should be a routine id generated by 'start-running', but got " << current_instruction().ingredients.at(0).original_string << '\n' << end(); + if (!is_mu_scalar(inst.ingredients.at(0))) { + raise << maybe(Recipe[r].name) << "first ingredient of 'wait-for-routine' should be a routine id generated by 'start-running', but got " << inst.ingredients.at(0).original_string << '\n' << end(); break; } + break; +} +:(before "End Primitive Recipe Implementations") +case WAIT_FOR_ROUTINE: { if (ingredients.at(0).at(0) == Current_routine->id) { raise << maybe(current_recipe_name()) << "routine can't wait for itself! " << current_instruction().to_string() << '\n' << end(); break; @@ -130,6 +138,10 @@ for (long long int i = 0; i < SIZE(Routines); ++i) { SWITCH, :(before "End Primitive Recipe Numbers") Recipe_ordinal["switch"] = SWITCH; +:(before "End Primitive Recipe Checks") +case SWITCH: { + break; +} :(before "End Primitive Recipe Implementations") case SWITCH: { long long int id = some_other_running_routine(); |