about summary refs log tree commit diff stats
path: root/html/020run.cc.html
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2016-10-06 21:49:36 -0700
committerKartik K. Agaram <vc@akkartik.com>2016-10-06 21:49:36 -0700
commiteeed3845cd504028779c333665e0b9fad2070357 (patch)
tree3cc104aef7a43adfe4a143437f18064ad1a804d4 /html/020run.cc.html
parent924253f1a5b8cdaa3ab301d752b9bdf855d6a0f9 (diff)
downloadmu-eeed3845cd504028779c333665e0b9fad2070357.tar.gz
3456
Diffstat (limited to 'html/020run.cc.html')
-rw-r--r--html/020run.cc.html7
1 files changed, 6 insertions, 1 deletions
diff --git a/html/020run.cc.html b/html/020run.cc.html
index ffecb92f..3dfae1b5 100644
--- a/html/020run.cc.html
+++ b/html/020run.cc.html
@@ -39,6 +39,9 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color
 <pre id='vimCodeElement'>
 <span class="Comment">//: Phase 3: Start running a loaded and transformed recipe.</span>
 <span class="Comment">//:</span>
+<span class="Comment">//:   The process of running mu code:</span>
+<span class="Comment">//:     load -&gt; transform -&gt; run</span>
+<span class="Comment">//:</span>
 <span class="Comment">//: So far we've seen recipes as lists of instructions, and instructions point</span>
 <span class="Comment">//: at other recipes. To kick things off mu needs to know how to run certain</span>
 <span class="Comment">//: 'primitive' recipes. That will then give the ability to run recipes</span>
@@ -196,9 +199,11 @@ load_file_or_directory<span class="Delimiter">(</span><span class="Constant">&qu
   <span class="Comment">// skip argv[0]</span>
   ++argv<span class="Delimiter">;</span>
   --argc<span class="Delimiter">;</span>
-  <span class="Comment">// ignore argv past '--'; that's commandline args for 'main'</span>
   <span class="Normal">while</span> <span class="Delimiter">(</span>argc &gt; <span class="Constant">0</span><span class="Delimiter">)</span> <span class="Delimiter">{</span>
+    <span class="Comment">// ignore argv past '--'; that's commandline args for 'main'</span>
     <span class="Normal">if</span> <span class="Delimiter">(</span>string<span class="Delimiter">(</span>*argv<span class="Delimiter">)</span> == <span class="Constant">&quot;--&quot;</span><span class="Delimiter">)</span> <span class="Identifier">break</span><span class="Delimiter">;</span>
+    <span class="Normal">if</span> <span class="Delimiter">(</span>starts_with<span class="Delimiter">(</span>*argv<span class="Delimiter">,</span> <span class="Constant">&quot;--&quot;</span><span class="Delimiter">))</span>
+      cerr &lt;&lt; <span class="Constant">&quot;treating &quot;</span> &lt;&lt; *argv &lt;&lt; <span class="Constant">&quot; as a file rather than an option</span><span class="cSpecial">\n</span><span class="Constant">&quot;</span><span class="Delimiter">;</span>
     load_file_or_directory<span class="Delimiter">(</span>*argv<span class="Delimiter">);</span>
     --argc<span class="Delimiter">;</span>
     ++argv<span class="Delimiter">;</span>