diff options
Diffstat (limited to 'html/042name.cc.html')
-rw-r--r-- | html/042name.cc.html | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/html/042name.cc.html b/html/042name.cc.html index 6067e28c..5b8dc773 100644 --- a/html/042name.cc.html +++ b/html/042name.cc.html @@ -96,6 +96,12 @@ Name = Name_snapshot<span class="Delimiter">;</span> <span class="Normal">int</span> v = lookup_name<span class="Delimiter">(</span>inst<span class="Delimiter">.</span>ingredients<span class="Delimiter">.</span>at<span class="Delimiter">(</span>in<span class="Delimiter">),</span> r<span class="Delimiter">);</span> <span class="Normal">if</span> <span class="Delimiter">(</span>v >= <span class="Constant">0</span><span class="Delimiter">)</span> <span class="Delimiter">{</span> inst<span class="Delimiter">.</span>ingredients<span class="Delimiter">.</span>at<span class="Delimiter">(</span>in<span class="Delimiter">).</span>set_value<span class="Delimiter">(</span>v<span class="Delimiter">);</span> + <span class="Comment">// HACK: belongs in a later layer, either in the scenario layer which</span> + <span class="Comment">// introduces the 'run' pseudo-instruction which is translated to</span> + <span class="Comment">// run_* recipes, or later when we start using screens and consoles in</span> + <span class="Comment">// scenarios.</span> + <span class="Normal">if</span> <span class="Delimiter">(</span>is_special_name<span class="Delimiter">(</span>inst<span class="Delimiter">.</span>ingredients<span class="Delimiter">.</span>at<span class="Delimiter">(</span>in<span class="Delimiter">).</span>name<span class="Delimiter">)</span> && caller<span class="Delimiter">.</span>name<span class="Delimiter">.</span>substr<span class="Delimiter">(</span><span class="Constant">0</span><span class="Delimiter">,</span> <span class="Constant">4</span><span class="Delimiter">)</span> == <span class="Constant">"run_"</span><span class="Delimiter">)</span> + inst<span class="Delimiter">.</span>ingredients<span class="Delimiter">.</span>at<span class="Delimiter">(</span>in<span class="Delimiter">).</span>properties<span class="Delimiter">.</span>push_back<span class="Delimiter">(</span>pair<string<span class="Delimiter">,</span> string_tree*><span class="Delimiter">(</span><span class="Constant">"raw"</span><span class="Delimiter">,</span> <span class="Constant">NULL</span><span class="Delimiter">));</span> <span class="Delimiter">}</span> <span class="Normal">else</span> <span class="Delimiter">{</span> raise << maybe<span class="Delimiter">(</span>caller<span class="Delimiter">.</span>name<span class="Delimiter">)</span> << <span class="Constant">"can't find a place to store '"</span> << inst<span class="Delimiter">.</span>ingredients<span class="Delimiter">.</span>at<span class="Delimiter">(</span>in<span class="Delimiter">).</span>name << <span class="Constant">"'</span><span class="cSpecial">\n</span><span class="Constant">"</span> << end<span class="Delimiter">();</span> @@ -115,6 +121,12 @@ Name = Name_snapshot<span class="Delimiter">;</span> <span class="Normal">int</span> v = lookup_name<span class="Delimiter">(</span>inst<span class="Delimiter">.</span>products<span class="Delimiter">.</span>at<span class="Delimiter">(</span>out<span class="Delimiter">),</span> r<span class="Delimiter">);</span> <span class="Normal">if</span> <span class="Delimiter">(</span>v >= <span class="Constant">0</span><span class="Delimiter">)</span> <span class="Delimiter">{</span> inst<span class="Delimiter">.</span>products<span class="Delimiter">.</span>at<span class="Delimiter">(</span>out<span class="Delimiter">).</span>set_value<span class="Delimiter">(</span>v<span class="Delimiter">);</span> + <span class="Comment">// HACK: belongs in a later layer, either in the scenario layer which</span> + <span class="Comment">// introduces the 'run' pseudo-instruction which is translated to</span> + <span class="Comment">// run_* recipes, or later when we start using screens and consoles in</span> + <span class="Comment">// scenarios.</span> + <span class="Normal">if</span> <span class="Delimiter">(</span>is_special_name<span class="Delimiter">(</span>inst<span class="Delimiter">.</span>products<span class="Delimiter">.</span>at<span class="Delimiter">(</span>out<span class="Delimiter">).</span>name<span class="Delimiter">)</span> && caller<span class="Delimiter">.</span>name<span class="Delimiter">.</span>substr<span class="Delimiter">(</span><span class="Constant">0</span><span class="Delimiter">,</span> <span class="Constant">4</span><span class="Delimiter">)</span> == <span class="Constant">"run_"</span><span class="Delimiter">)</span> + inst<span class="Delimiter">.</span>products<span class="Delimiter">.</span>at<span class="Delimiter">(</span>out<span class="Delimiter">).</span>properties<span class="Delimiter">.</span>push_back<span class="Delimiter">(</span>pair<string<span class="Delimiter">,</span> string_tree*><span class="Delimiter">(</span><span class="Constant">"raw"</span><span class="Delimiter">,</span> <span class="Constant">NULL</span><span class="Delimiter">));</span> <span class="Delimiter">}</span> <span class="Normal">else</span> <span class="Delimiter">{</span> raise << maybe<span class="Delimiter">(</span>caller<span class="Delimiter">.</span>name<span class="Delimiter">)</span> << <span class="Constant">"can't find a place to store '"</span> << inst<span class="Delimiter">.</span>products<span class="Delimiter">.</span>at<span class="Delimiter">(</span>out<span class="Delimiter">).</span>name << <span class="Constant">"'</span><span class="cSpecial">\n</span><span class="Constant">"</span> << end<span class="Delimiter">();</span> |