diff options
Diffstat (limited to 'cpp/013run')
-rw-r--r-- | cpp/013run | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/cpp/013run b/cpp/013run index 5173f6f3..33385e00 100644 --- a/cpp/013run +++ b/cpp/013run @@ -118,9 +118,8 @@ recipes_added_by_test.clear(); //: beware: overridden in later layers vector<int> read_memory(reagent x) { //? cout << "read_memory: " << x.to_string() << '\n'; //? 1 - static const int LITERAL = Type_number["literal"]; vector<int> result; - if (x.types[0] == LITERAL) { + if (isa_literal(x)) { result.push_back(x.value); return result; } @@ -157,6 +156,10 @@ bool is_dummy(const reagent& x) { return x.name == "_"; } +bool isa_literal(const reagent& r) { + return r.types.size() == 1 && r.types[0] == 0; +} + :(scenario run_label) recipe main [ +foo |