diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2016-05-26 21:16:14 -0700 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2016-05-26 21:43:38 -0700 |
commit | a791c04264433696635d598471f3004c97f9ad50 (patch) | |
tree | 6a653a0f57d2af9a685056273128da86c6284f57 /042name.cc | |
parent | 2b4bf8a800858d0e2209cd753b0ad1e95a4dfc1f (diff) | |
download | mu-a791c04264433696635d598471f3004c97f9ad50.tar.gz |
3020 - names in chessboard tests
Extremely ugly change. Also ended up fixing some places where I was mixing up sources and sinks. But I'm not going to bother updating edit/ and sandbox/ apps. Just too many scenarios to clean up.
Diffstat (limited to '042name.cc')
-rw-r--r-- | 042name.cc | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/042name.cc b/042name.cc index 9c40cf63..2dcfd524 100644 --- a/042name.cc +++ b/042name.cc @@ -59,6 +59,12 @@ void transform_names(const recipe_ordinal r) { int v = lookup_name(inst.ingredients.at(in), r); if (v >= 0) { inst.ingredients.at(in).set_value(v); + // HACK: belongs in a later layer, either in the scenario layer which + // introduces the 'run' pseudo-instruction which is translated to + // run_* recipes, or later when we start using screens and consoles in + // scenarios. + if (is_special_name(inst.ingredients.at(in).name) && caller.name.substr(0, 4) == "run_") + inst.ingredients.at(in).properties.push_back(pair<string, string_tree*>("raw", NULL)); } else { raise << maybe(caller.name) << "can't find a place to store '" << inst.ingredients.at(in).name << "'\n" << end(); @@ -78,6 +84,12 @@ void transform_names(const recipe_ordinal r) { int v = lookup_name(inst.products.at(out), r); if (v >= 0) { inst.products.at(out).set_value(v); + // HACK: belongs in a later layer, either in the scenario layer which + // introduces the 'run' pseudo-instruction which is translated to + // run_* recipes, or later when we start using screens and consoles in + // scenarios. + if (is_special_name(inst.products.at(out).name) && caller.name.substr(0, 4) == "run_") + inst.products.at(out).properties.push_back(pair<string, string_tree*>("raw", NULL)); } else { raise << maybe(caller.name) << "can't find a place to store '" << inst.products.at(out).name << "'\n" << end(); |