about summary refs log tree commit diff stats
path: root/011load.cc
diff options
context:
space:
mode:
Diffstat (limited to '011load.cc')
-rw-r--r--011load.cc24
1 files changed, 12 insertions, 12 deletions
diff --git a/011load.cc b/011load.cc
index f3fb8793..be0ca375 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_warnings = true;
+      Disable_redefine_errors = true;
       result.push_back(slurp_recipe(in));
-      Disable_redefine_warnings = false;
+      Disable_redefine_errors = false;
     }
     // End Command Handlers
     else {
@@ -54,7 +54,7 @@ long long int slurp_recipe(istream& in) {
   if (Recipe.find(get(Recipe_ordinal, result.name)) != Recipe.end()) {
     trace(9991, "parse") << "already exists" << end();
     if (warn_on_redefine(result.name))
-      raise << "redefining recipe " << result.name << "\n" << end();
+      raise_error << "redefining recipe " << result.name << "\n" << end();
     Recipe.erase(get(Recipe_ordinal, result.name));
   }
   slurp_body(in, result);
@@ -206,14 +206,14 @@ void skip_comment(istream& in) {
 
 //: Warn if a recipe gets redefined, because large codebases can accidentally
 //: step on their own toes. But there'll be many occasions later where
-//: we'll want to disable the warnings.
+//: we'll want to disable the errors.
 :(before "End Globals")
-bool Disable_redefine_warnings = false;
+bool Disable_redefine_errors = false;
 :(before "End Setup")
-Disable_redefine_warnings = false;
+Disable_redefine_errors = false;
 :(code)
 bool warn_on_redefine(const string& recipe_name) {
-  if (Disable_redefine_warnings) return false;
+  if (Disable_redefine_errors) return false;
   return true;
 }
 
@@ -364,22 +364,22 @@ void test_parse_comment_terminated_by_eof() {
 }
 
 :(scenario warn_on_redefine)
-% Hide_warnings = true;
+% Hide_errors = true;
 recipe main [
   1:number <- copy 23
 ]
 recipe main [
   1:number <- copy 24
 ]
-+warn: redefining recipe main
++error: redefining recipe main
 
 :(scenario redefine_without_warning)
-% Hide_warnings = true;
+% Hide_errors = true;
 recipe main [
   1:number <- copy 23
 ]
 recipe! main [
   1:number <- copy 24
 ]
--warn: redefining recipe main
-$warn: 0
+-error: redefining recipe main
+$error: 0
ty/blame/themes/shade?id=7bdc46c012e58df98ac68b6e7a8bbbcb3452958e'>^
6dabbbd5 ^


6dabbbd5 ^
30b5f112 ^
2f82f50a ^
86c1c388 ^
1a3dc91e ^
30b5f112 ^
6dabbbd5 ^
30b5f112 ^
fbc30231 ^

















cd2458c0 ^

0ae975c2 ^

b21edfaa ^
cd2458c0 ^
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78