diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2015-04-17 10:31:17 -0700 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2015-04-17 10:31:17 -0700 |
commit | 1848b18f02b158861008214efd19708585bfcbe5 (patch) | |
tree | 3b5ddc0355f9b2b099156a668761cf45edefefb1 /cpp/030brace | |
parent | 9da1b126cc017e14035b94c4615d211e5bc4bb21 (diff) | |
download | mu-1848b18f02b158861008214efd19708585bfcbe5.tar.gz |
1073 - stop fixing the values of primitive recipes
In the process I give up trace stability when I move files around, but I gain in exchange the ability to move files around.
Diffstat (limited to 'cpp/030brace')
-rw-r--r-- | cpp/030brace | 33 |
1 files changed, 11 insertions, 22 deletions
diff --git a/cpp/030brace b/cpp/030brace index 0d68b54f..d01fe359 100644 --- a/cpp/030brace +++ b/cpp/030brace @@ -1,6 +1,6 @@ //: Structured programming //: -//: Our jump operators are quite inconvenient to use, so mu provides a +//: Our jump recipes are quite inconvenient to use, so mu provides a //: lightweight tool called 'transform_braces' to work in a slightly more //: convenient format with nested braces: //: @@ -168,34 +168,23 @@ void transform_test(string form) { //? cout << "AAA }\n"; //? 1 } -//: Make sure these pseudo recipes get consistent numbers, even though they aren't -//: implemented. -:(before "End Globals") -const int BREAK = 24; -const int BREAK_IF = 25; -const int BREAK_UNLESS = 26; -const int LOOP = 27; -const int LOOP_IF = 28; -const int LOOP_UNLESS = 29; +//: Make sure these pseudo recipes get consistent numbers in all tests, even +//: though they aren't implemented. + +:(before "End Primitive Recipe Declarations") +BREAK, +BREAK_IF, +BREAK_UNLESS, +LOOP, +LOOP_IF, +LOOP_UNLESS, :(before "End Primitive Recipe Numbers") Recipe_number["break"] = BREAK; -assert(Next_recipe_number == BREAK); -Next_recipe_number++; Recipe_number["break-if"] = BREAK_IF; -assert(Next_recipe_number == BREAK_IF); -Next_recipe_number++; Recipe_number["break-unless"] = BREAK_UNLESS; -assert(Next_recipe_number == BREAK_UNLESS); -Next_recipe_number++; Recipe_number["loop"] = LOOP; -assert(Next_recipe_number == LOOP); -Next_recipe_number++; Recipe_number["loop-if"] = LOOP_IF; -assert(Next_recipe_number == LOOP_IF); -Next_recipe_number++; Recipe_number["loop-unless"] = LOOP_UNLESS; -assert(Next_recipe_number == LOOP_UNLESS); -Next_recipe_number++; :(scenario "loop") recipe main [ |