diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2016-10-22 04:04:46 -0700 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2016-10-22 04:04:46 -0700 |
commit | beea7ce25cfe42c363259705a6b5741ad47484ab (patch) | |
tree | d30b44a935bad1cb6c88083c57caabdf062ed513 /html/089scenario_filesystem.cc.html | |
parent | 98e3a41bf96b37d94f6b0a0e98a4635a174e9903 (diff) | |
download | mu-beea7ce25cfe42c363259705a6b5741ad47484ab.tar.gz |
3543
Diffstat (limited to 'html/089scenario_filesystem.cc.html')
-rw-r--r-- | html/089scenario_filesystem.cc.html | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/html/089scenario_filesystem.cc.html b/html/089scenario_filesystem.cc.html index 8d42226c..7fa10101 100644 --- a/html/089scenario_filesystem.cc.html +++ b/html/089scenario_filesystem.cc.html @@ -19,7 +19,7 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color .Comment { color: #9090ff; } .Delimiter { color: #800080; } .Special { color: #c00000; } -.Identifier { color: #fcb165; } +.Identifier { color: #ecf32c; } .Normal { color: #eeeeee; background-color: #080808; padding-bottom: 1px; } --> </style> @@ -149,6 +149,11 @@ put<span class="Delimiter">(</span>Recipe_ordinal<span class="Delimiter">,</span skip_whitespace_and_comments<span class="Delimiter">(</span>in<span class="Delimiter">);</span> <span class="Normal">if</span> <span class="Delimiter">(</span>!has_data<span class="Delimiter">(</span>in<span class="Delimiter">))</span> <span class="Identifier">break</span><span class="Delimiter">;</span> string filename = next_word<span class="Delimiter">(</span>in<span class="Delimiter">);</span> + <span class="Normal">if</span> <span class="Delimiter">(</span>filename<span class="Delimiter">.</span>empty<span class="Delimiter">())</span> <span class="Delimiter">{</span> + assert<span class="Delimiter">(</span>!has_data<span class="Delimiter">(</span>in<span class="Delimiter">));</span> + raise << <span class="Constant">"incomplete 'resources' block at end of file (0)</span><span class="cSpecial">\n</span><span class="Constant">"</span> << end<span class="Delimiter">();</span> + <span class="Identifier">return</span><span class="Delimiter">;</span> + <span class="Delimiter">}</span> <span class="Normal">if</span> <span class="Delimiter">(</span>*filename<span class="Delimiter">.</span>begin<span class="Delimiter">()</span> != <span class="Constant">'['</span><span class="Delimiter">)</span> <span class="Delimiter">{</span> raise << caller << <span class="Constant">": assume-resources: filename '"</span> << filename << <span class="Constant">"' must begin with a '['</span><span class="cSpecial">\n</span><span class="Constant">"</span> << end<span class="Delimiter">();</span> <span class="Identifier">break</span><span class="Delimiter">;</span> @@ -164,6 +169,11 @@ put<span class="Delimiter">(</span>Recipe_ordinal<span class="Delimiter">,</span <span class="Identifier">break</span><span class="Delimiter">;</span> <span class="Delimiter">}</span> string arrow = next_word<span class="Delimiter">(</span>in<span class="Delimiter">);</span> + <span class="Normal">if</span> <span class="Delimiter">(</span>arrow<span class="Delimiter">.</span>empty<span class="Delimiter">())</span> <span class="Delimiter">{</span> + assert<span class="Delimiter">(</span>!has_data<span class="Delimiter">(</span>in<span class="Delimiter">));</span> + raise << <span class="Constant">"incomplete 'resources' block at end of file (1)</span><span class="cSpecial">\n</span><span class="Constant">"</span> << end<span class="Delimiter">();</span> + <span class="Identifier">return</span><span class="Delimiter">;</span> + <span class="Delimiter">}</span> <span class="Normal">if</span> <span class="Delimiter">(</span>arrow != <span class="Constant">"<-"</span><span class="Delimiter">)</span> <span class="Delimiter">{</span> raise << caller << <span class="Constant">": assume-resources: expected '<-' after filename '"</span> << filename << <span class="Constant">"' but got '"</span> << arrow << <span class="Constant">"'</span><span class="cSpecial">\n</span><span class="Constant">"</span> << end<span class="Delimiter">();</span> <span class="Identifier">break</span><span class="Delimiter">;</span> @@ -173,6 +183,11 @@ put<span class="Delimiter">(</span>Recipe_ordinal<span class="Delimiter">,</span <span class="Identifier">break</span><span class="Delimiter">;</span> <span class="Delimiter">}</span> string contents = next_word<span class="Delimiter">(</span>in<span class="Delimiter">);</span> + <span class="Normal">if</span> <span class="Delimiter">(</span>contents<span class="Delimiter">.</span>empty<span class="Delimiter">())</span> <span class="Delimiter">{</span> + assert<span class="Delimiter">(</span>!has_data<span class="Delimiter">(</span>in<span class="Delimiter">));</span> + raise << <span class="Constant">"incomplete 'resources' block at end of file (2)</span><span class="cSpecial">\n</span><span class="Constant">"</span> << end<span class="Delimiter">();</span> + <span class="Identifier">return</span><span class="Delimiter">;</span> + <span class="Delimiter">}</span> <span class="Normal">if</span> <span class="Delimiter">(</span>*contents<span class="Delimiter">.</span>begin<span class="Delimiter">()</span> != <span class="Constant">'['</span><span class="Delimiter">)</span> <span class="Delimiter">{</span> raise << caller << <span class="Constant">": assume-resources: file contents '"</span> << contents << <span class="Constant">"' for filename '"</span> << filename << <span class="Constant">"' must begin with a '['</span><span class="cSpecial">\n</span><span class="Constant">"</span> << end<span class="Delimiter">();</span> <span class="Identifier">break</span><span class="Delimiter">;</span> |