blob: 4db30d6c4e118c2a10a827766df7e7a0cba58290 (
plain) (
blame)
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
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<title>Mu - 998check_type_pointers.cc</title>
<meta name="Generator" content="Vim/7.3">
<meta name="plugin-version" content="vim7.3_v6">
<meta name="syntax" content="cpp">
<meta name="settings" content="use_css">
<style type="text/css">
<!--
pre { font-family: monospace; color: #eeeeee; background-color: #080808; }
body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color: #080808; }
.CommentedCode { color: #6c6c6c; }
.Comment { color: #9090ff; }
-->
</style>
</head>
<body>
<pre>
<span class="Comment">//: enable this when tracking down null types</span>
<span class="Comment">//: (but it interferes with edit/; since recipes created in the environment</span>
<span class="Comment">//: can raise warnings here which will stop running the entire environment)</span>
<span class="CommentedCode">//? :(before "End Transform All")</span>
<span class="CommentedCode">//? check_type_pointers();</span>
<span class="CommentedCode">//? </span>
<span class="CommentedCode">//? :(code)</span>
<span class="CommentedCode">//? void check_type_pointers() {</span>
<span class="CommentedCode">//? for (map<recipe_ordinal, recipe>::iterator p = Recipe.begin(); p != Recipe.end(); ++p) {</span>
<span class="CommentedCode">//? if (any_type_ingredient_in_header(p->first)) continue;</span>
<span class="CommentedCode">//? const recipe& r = p->second;</span>
<span class="CommentedCode">//? for (long long int i = 0; i < SIZE(r.steps); ++i) {</span>
<span class="CommentedCode">//? const instruction& inst = r.steps.at(i);</span>
<span class="CommentedCode">//? for (long long int j = 0; j < SIZE(inst.ingredients); ++j) {</span>
<span class="CommentedCode">//? if (!inst.ingredients.at(j).type) {</span>
<span class="CommentedCode">//? raise_error << maybe(r.name) << " '" << inst.to_string() << "' -- " << inst.ingredients.at(j).to_string() << " has no type\n" << end();</span>
<span class="CommentedCode">//? return;</span>
<span class="CommentedCode">//? }</span>
<span class="CommentedCode">//? if (!inst.ingredients.at(j).properties.at(0).second) {</span>
<span class="CommentedCode">//? raise_error << maybe(r.name) << " '" << inst.to_string() << "' -- " << inst.ingredients.at(j).to_string() << " has no type name\n" << end();</span>
<span class="CommentedCode">//? return;</span>
<span class="CommentedCode">//? }</span>
<span class="CommentedCode">//? }</span>
<span class="CommentedCode">//? for (long long int j = 0; j < SIZE(inst.products); ++j) {</span>
<span class="CommentedCode">//? if (!inst.products.at(j).type) {</span>
<span class="CommentedCode">//? raise_error << maybe(r.name) << " '" << inst.to_string() << "' -- " << inst.products.at(j).to_string() << " has no type\n" << end();</span>
<span class="CommentedCode">//? return;</span>
<span class="CommentedCode">//? }</span>
<span class="CommentedCode">//? if (!inst.products.at(j).properties.at(0).second) {</span>
<span class="CommentedCode">//? raise_error << maybe(r.name) << " '" << inst.to_string() << "' -- " << inst.products.at(j).to_string() << " has no type name\n" << end();</span>
<span class="CommentedCode">//? return;</span>
<span class="CommentedCode">//? }</span>
<span class="CommentedCode">//? }</span>
<span class="CommentedCode">//? }</span>
<span class="CommentedCode">//? }</span>
<span class="CommentedCode">//? }</span>
</pre>
</body>
</html>
|