diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2017-12-03 23:25:40 -0800 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2017-12-03 23:25:40 -0800 |
commit | 4a48bedcd1d708a43d43dc6259a4e45c52ea3d00 (patch) | |
tree | 85c1b7310cca932797d727a3de8da96eb175d8da /html/014literal_string.cc.html | |
parent | ef7d834fdd826977cd8d43253052a7b8e1c5aa72 (diff) | |
download | mu-4a48bedcd1d708a43d43dc6259a4e45c52ea3d00.tar.gz |
4134 - 'input' = 'ingredient'
Diffstat (limited to 'html/014literal_string.cc.html')
-rw-r--r-- | html/014literal_string.cc.html | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/html/014literal_string.cc.html b/html/014literal_string.cc.html index 067f1ca4..07bfa932 100644 --- a/html/014literal_string.cc.html +++ b/html/014literal_string.cc.html @@ -95,7 +95,7 @@ if ('onhashchange' in window) { <span id="L32" class="LineNr"> 32 </span><span class="Delimiter">:(code)</span> <span id="L33" class="LineNr"> 33 </span>string <a href='014literal_string.cc.html#L33'>slurp_quoted</a><span class="Delimiter">(</span>istream& in<span class="Delimiter">)</span> <span class="Delimiter">{</span> <span id="L34" class="LineNr"> 34 </span> ostringstream out<span class="Delimiter">;</span> -<span id="L35" class="LineNr"> 35 </span> assert<span class="Delimiter">(</span><a href='001help.cc.html#L238'>has_data</a><span class="Delimiter">(</span>in<span class="Delimiter">));</span> assert<span class="Delimiter">(</span>in<span class="Delimiter">.</span>peek<span class="Delimiter">()</span> == <span class="Constant">'['</span><span class="Delimiter">);</span> out << <span class="Normal">static_cast</span><<span class="Normal">char</span>><span class="Delimiter">(</span>in<span class="Delimiter">.</span>get<span class="Delimiter">());</span> <span class="Comment">// slurp the '['</span> +<span id="L35" class="LineNr"> 35 </span> assert<span class="Delimiter">(</span><a href='001help.cc.html#L239'>has_data</a><span class="Delimiter">(</span>in<span class="Delimiter">));</span> assert<span class="Delimiter">(</span>in<span class="Delimiter">.</span>peek<span class="Delimiter">()</span> == <span class="Constant">'['</span><span class="Delimiter">);</span> out << <span class="Normal">static_cast</span><<span class="Normal">char</span>><span class="Delimiter">(</span>in<span class="Delimiter">.</span>get<span class="Delimiter">());</span> <span class="Comment">// slurp the '['</span> <span id="L36" class="LineNr"> 36 </span> <span class="Normal">if</span> <span class="Delimiter">(</span><a href='014literal_string.cc.html#L45'>is_code_string</a><span class="Delimiter">(</span>in<span class="Delimiter">,</span> out<span class="Delimiter">))</span> <span id="L37" class="LineNr"> 37 </span> <span class="Conceal">¦</span> <a href='014literal_string.cc.html#L82'>slurp_quoted_comment_aware</a><span class="Delimiter">(</span>in<span class="Delimiter">,</span> out<span class="Delimiter">);</span> <span id="L38" class="LineNr"> 38 </span> <span class="Normal">else</span> @@ -106,7 +106,7 @@ if ('onhashchange' in window) { <span id="L43" class="LineNr"> 43 </span><span class="Comment">// A string is a code string (ignores comments when scanning for matching</span> <span id="L44" class="LineNr"> 44 </span><span class="Comment">// brackets) if it contains a newline at the start before any non-whitespace.</span> <span id="L45" class="LineNr"> 45 </span><span class="Normal">bool</span> <a href='014literal_string.cc.html#L45'>is_code_string</a><span class="Delimiter">(</span>istream& in<span class="Delimiter">,</span> ostream& out<span class="Delimiter">)</span> <span class="Delimiter">{</span> -<span id="L46" class="LineNr"> 46 </span> <span class="Normal">while</span> <span class="Delimiter">(</span><a href='001help.cc.html#L238'>has_data</a><span class="Delimiter">(</span>in<span class="Delimiter">))</span> <span class="Delimiter">{</span> +<span id="L46" class="LineNr"> 46 </span> <span class="Normal">while</span> <span class="Delimiter">(</span><a href='001help.cc.html#L239'>has_data</a><span class="Delimiter">(</span>in<span class="Delimiter">))</span> <span class="Delimiter">{</span> <span id="L47" class="LineNr"> 47 </span> <span class="Conceal">¦</span> <span class="Normal">char</span> c = in<span class="Delimiter">.</span>get<span class="Delimiter">();</span> <span id="L48" class="LineNr"> 48 </span> <span class="Conceal">¦</span> <span class="Normal">if</span> <span class="Delimiter">(</span>!isspace<span class="Delimiter">(</span>c<span class="Delimiter">))</span> <span class="Delimiter">{</span> <span id="L49" class="LineNr"> 49 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> in<span class="Delimiter">.</span>putback<span class="Delimiter">(</span>c<span class="Delimiter">);</span> @@ -124,7 +124,7 @@ if ('onhashchange' in window) { <span id="L61" class="LineNr"> 61 </span><span class="Comment">// strings.</span> <span id="L62" class="LineNr"> 62 </span><span class="Normal">void</span> <a href='014literal_string.cc.html#L62'>slurp_quoted_comment_oblivious</a><span class="Delimiter">(</span>istream& in<span class="Delimiter">,</span> ostream& out<span class="Delimiter">)</span> <span class="Delimiter">{</span> <span id="L63" class="LineNr"> 63 </span> <span class="Normal">int</span> brace_depth = <span class="Constant">1</span><span class="Delimiter">;</span> -<span id="L64" class="LineNr"> 64 </span> <span class="Normal">while</span> <span class="Delimiter">(</span><a href='001help.cc.html#L238'>has_data</a><span class="Delimiter">(</span>in<span class="Delimiter">))</span> <span class="Delimiter">{</span> +<span id="L64" class="LineNr"> 64 </span> <span class="Normal">while</span> <span class="Delimiter">(</span><a href='001help.cc.html#L239'>has_data</a><span class="Delimiter">(</span>in<span class="Delimiter">))</span> <span class="Delimiter">{</span> <span id="L65" class="LineNr"> 65 </span> <span class="Conceal">¦</span> <span class="Normal">char</span> c = in<span class="Delimiter">.</span>get<span class="Delimiter">();</span> <span id="L66" class="LineNr"> 66 </span> <span class="Conceal">¦</span> <span class="Normal">if</span> <span class="Delimiter">(</span>c == <span class="cSpecial">'\\'</span><span class="Delimiter">)</span> <span class="Delimiter">{</span> <span id="L67" class="LineNr"> 67 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> <a href='014literal_string.cc.html#L148'>slurp_one_past_backslashes</a><span class="Delimiter">(</span>in<span class="Delimiter">,</span> out<span class="Delimiter">);</span> @@ -151,7 +151,7 @@ if ('onhashchange' in window) { <span id="L88" class="LineNr"> 88 </span> <span class="Conceal">¦</span> <span class="Delimiter">}</span> <span id="L89" class="LineNr"> 89 </span> <span class="Conceal">¦</span> <span class="Normal">if</span> <span class="Delimiter">(</span>c == <span class="Constant">'#'</span><span class="Delimiter">)</span> <span class="Delimiter">{</span> <span id="L90" class="LineNr"> 90 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> out << c<span class="Delimiter">;</span> -<span id="L91" class="LineNr"> 91 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> <span class="Normal">while</span> <span class="Delimiter">(</span><a href='001help.cc.html#L238'>has_data</a><span class="Delimiter">(</span>in<span class="Delimiter">)</span> && in<span class="Delimiter">.</span>peek<span class="Delimiter">()</span> != <span class="cSpecial">'\n'</span><span class="Delimiter">)</span> out << <span class="Normal">static_cast</span><<span class="Normal">char</span>><span class="Delimiter">(</span>in<span class="Delimiter">.</span>get<span class="Delimiter">());</span> +<span id="L91" class="LineNr"> 91 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> <span class="Normal">while</span> <span class="Delimiter">(</span><a href='001help.cc.html#L239'>has_data</a><span class="Delimiter">(</span>in<span class="Delimiter">)</span> && in<span class="Delimiter">.</span>peek<span class="Delimiter">()</span> != <span class="cSpecial">'\n'</span><span class="Delimiter">)</span> out << <span class="Normal">static_cast</span><<span class="Normal">char</span>><span class="Delimiter">(</span>in<span class="Delimiter">.</span>get<span class="Delimiter">());</span> <span id="L92" class="LineNr"> 92 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> <span class="Identifier">continue</span><span class="Delimiter">;</span> <span id="L93" class="LineNr"> 93 </span> <span class="Conceal">¦</span> <span class="Delimiter">}</span> <span id="L94" class="LineNr"> 94 </span> <span class="Conceal">¦</span> <span class="Normal">if</span> <span class="Delimiter">(</span>c == <span class="Constant">'['</span><span class="Delimiter">)</span> <span class="Delimiter">{</span> @@ -223,7 +223,7 @@ if ('onhashchange' in window) { <span id="L160" class="LineNr">160 </span> <span class="Comment">// special characters. So Mu doesn't follow C's approach of overloading</span> <span id="L161" class="LineNr">161 </span> <span class="Comment">// backslashes both to escape quote characters and also as a notation for</span> <span id="L162" class="LineNr">162 </span> <span class="Comment">// unprintable characters like '\n'.</span> -<span id="L163" class="LineNr">163 </span> <span class="Normal">while</span> <span class="Delimiter">(</span><a href='001help.cc.html#L238'>has_data</a><span class="Delimiter">(</span>in<span class="Delimiter">))</span> <span class="Delimiter">{</span> +<span id="L163" class="LineNr">163 </span> <span class="Normal">while</span> <span class="Delimiter">(</span><a href='001help.cc.html#L239'>has_data</a><span class="Delimiter">(</span>in<span class="Delimiter">))</span> <span class="Delimiter">{</span> <span id="L164" class="LineNr">164 </span> <span class="Conceal">¦</span> <span class="Normal">char</span> c = in<span class="Delimiter">.</span>get<span class="Delimiter">();</span> <span id="L165" class="LineNr">165 </span> <span class="Conceal">¦</span> out << c<span class="Delimiter">;</span> <span id="L166" class="LineNr">166 </span> <span class="Conceal">¦</span> <span class="Normal">if</span> <span class="Delimiter">(</span>c != <span class="cSpecial">'\\'</span><span class="Delimiter">)</span> <span class="Identifier">break</span><span class="Delimiter">;</span> |