about summary refs log tree commit diff stats
path: root/011load.cc
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2016-02-25 11:29:42 -0800
committerKartik K. Agaram <vc@akkartik.com>2016-02-25 11:29:42 -0800
commita0b9fa55a0e00a9dcf82ecfa081152ab5296b424 (patch)
tree3711a95df99bf2b411af1c65c9c008c5cb3d7433 /011load.cc
parent05331766a971ecd1c3df236af0b374ae039b1142 (diff)
downloadmu-a0b9fa55a0e00a9dcf82ecfa081152ab5296b424.tar.gz
2704 - eradicate all mention of warnings from core
Diffstat (limited to '011load.cc')
-rw-r--r--011load.cc18
1 files changed, 9 insertions, 9 deletions
diff --git a/011load.cc b/011load.cc
index be0ca375..97af75f7 100644
--- a/011load.cc
+++ b/011load.cc
@@ -28,9 +28,9 @@ vector<recipe_ordinal> load(istream& in) {
       result.push_back(slurp_recipe(in));
     }
     else if (command == "recipe!") {
-      Disable_redefine_errors = true;
+      Disable_redefine_checks = true;
       result.push_back(slurp_recipe(in));
-      Disable_redefine_errors = false;
+      Disable_redefine_checks = false;
     }
     // End Command Handlers
     else {
@@ -53,7 +53,7 @@ long long int slurp_recipe(istream& in) {
     put(Recipe_ordinal, result.name, Next_recipe_ordinal++);
   if (Recipe.find(get(Recipe_ordinal, result.name)) != Recipe.end()) {
     trace(9991, "parse") << "already exists" << end();
-    if (warn_on_redefine(result.name))
+    if (should_check_for_redefine(result.name))
       raise_error << "redefining recipe " << result.name << "\n" << end();
     Recipe.erase(get(Recipe_ordinal, result.name));
   }
@@ -208,12 +208,12 @@ void skip_comment(istream& in) {
 //: step on their own toes. But there'll be many occasions later where
 //: we'll want to disable the errors.
 :(before "End Globals")
-bool Disable_redefine_errors = false;
+bool Disable_redefine_checks = false;
 :(before "End Setup")
-Disable_redefine_errors = false;
+Disable_redefine_checks = false;
 :(code)
-bool warn_on_redefine(const string& recipe_name) {
-  if (Disable_redefine_errors) return false;
+bool should_check_for_redefine(const string& recipe_name) {
+  if (Disable_redefine_checks) return false;
   return true;
 }
 
@@ -363,7 +363,7 @@ void test_parse_comment_terminated_by_eof() {
   cerr << ".";  // termination = success
 }
 
-:(scenario warn_on_redefine)
+:(scenario forbid_redefining_recipes)
 % Hide_errors = true;
 recipe main [
   1:number <- copy 23
@@ -373,7 +373,7 @@ recipe main [
 ]
 +error: redefining recipe main
 
-:(scenario redefine_without_warning)
+:(scenario permit_forcibly_redefining_recipes)
 % Hide_errors = true;
 recipe main [
   1:number <- copy 23