diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2015-04-24 00:28:24 -0700 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2015-04-24 00:28:24 -0700 |
commit | 8c9e97ae0183e79accbcb1afc57499f83c0b5406 (patch) | |
tree | 2411df7fd69a386046f65266ecff9304075e51c1 /cpp/011load | |
parent | 01152aa268e54aebade352965ce1200b49fc8f4f (diff) | |
download | mu-8c9e97ae0183e79accbcb1afc57499f83c0b5406.tar.gz |
1155 - three phases of mu: load, transform, run
Each phase implicitly calls previous phases. Most C++ scenarios implicitly call one, two or three of the phases. More clear now that 'load' does more than just add recipes.
Diffstat (limited to 'cpp/011load')
-rw-r--r-- | cpp/011load | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/cpp/011load b/cpp/011load index 3dea0d66..c643a92e 100644 --- a/cpp/011load +++ b/cpp/011load @@ -1,6 +1,6 @@ -//: It's often convenient to express recipes in a textual fashion. +//: Phase 1 of running mu code: load it from a textual representation. -:(scenarios add_recipes) +:(scenarios load) :(scenario first_recipe) recipe main [ 1:integer <- copy 23:literal @@ -10,13 +10,13 @@ recipe main [ +parse: product: {name: "1", value: 0, type: 1, properties: ["1": "integer"]} :(code) -vector<recipe_number> add_recipes(string form) { +vector<recipe_number> load(string form) { istringstream in(form); in >> std::noskipws; - return add_recipes(in); + return load(in); } -vector<recipe_number> add_recipes(istream& in) { +vector<recipe_number> load(istream& in) { vector<recipe_number> result; while (!in.eof()) { skip_comments_and_newlines(in); |