diff options
Diffstat (limited to 'html/014literal_string.cc.html')
-rw-r--r-- | html/014literal_string.cc.html | 103 |
1 files changed, 52 insertions, 51 deletions
diff --git a/html/014literal_string.cc.html b/html/014literal_string.cc.html index 30b36230..189126ed 100644 --- a/html/014literal_string.cc.html +++ b/html/014literal_string.cc.html @@ -16,15 +16,16 @@ a { text-decoration: none; } a:hover { text-decoration: underline; } * { font-size: 12pt; font-size: 1em; } .Constant { color: #00a0a0; } -.Special { color: #c00000; } .muRecipe { color: #ff8700; } -.cSpecial { color: #008000; } +.Conceal { color: #4e4e4e; } +.Special { color: #c00000; } .Comment { color: #9090ff; } .Delimiter { color: #800080; } .LineNr { color: #444444; } -.traceContains { color: #008000; } -.Normal { color: #eeeeee; background-color: #080808; padding-bottom: 1px; } .Identifier { color: #c0a020; } +.Normal { color: #eeeeee; background-color: #080808; padding-bottom: 1px; } +.cSpecial { color: #008000; } +.traceContains { color: #008000; } --> </style> @@ -95,9 +96,9 @@ if ('onhashchange' in window) { <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#L235'>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> <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="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> -<span id="L39" class="LineNr"> 39 </span> <a href='014literal_string.cc.html#L62'>slurp_quoted_comment_oblivious</a><span class="Delimiter">(</span>in<span class="Delimiter">,</span> out<span class="Delimiter">);</span> +<span id="L39" class="LineNr"> 39 </span> <span class="Conceal">¦</span> <a href='014literal_string.cc.html#L62'>slurp_quoted_comment_oblivious</a><span class="Delimiter">(</span>in<span class="Delimiter">,</span> out<span class="Delimiter">);</span> <span id="L40" class="LineNr"> 40 </span> <span class="Identifier">return</span> out<span class="Delimiter">.</span>str<span class="Delimiter">();</span> <span id="L41" class="LineNr"> 41 </span><span class="Delimiter">}</span> <span id="L42" class="LineNr"> 42 </span> @@ -105,15 +106,15 @@ if ('onhashchange' in window) { <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#L235'>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="Normal">char</span> c = in<span class="Delimiter">.</span>get<span class="Delimiter">();</span> -<span id="L48" class="LineNr"> 48 </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> in<span class="Delimiter">.</span>putback<span class="Delimiter">(</span>c<span class="Delimiter">);</span> -<span id="L50" class="LineNr"> 50 </span> <span class="Identifier">return</span> <span class="Constant">false</span><span class="Delimiter">;</span> -<span id="L51" class="LineNr"> 51 </span> <span class="Delimiter">}</span> -<span id="L52" class="LineNr"> 52 </span> out << c<span class="Delimiter">;</span> -<span id="L53" class="LineNr"> 53 </span> <span class="Normal">if</span> <span class="Delimiter">(</span>c == <span class="cSpecial">'\n'</span><span class="Delimiter">)</span> <span class="Delimiter">{</span> -<span id="L54" class="LineNr"> 54 </span> <span class="Identifier">return</span> <span class="Constant">true</span><span class="Delimiter">;</span> -<span id="L55" class="LineNr"> 55 </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> +<span id="L50" class="LineNr"> 50 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> <span class="Identifier">return</span> <span class="Constant">false</span><span class="Delimiter">;</span> +<span id="L51" class="LineNr"> 51 </span> <span class="Conceal">¦</span> <span class="Delimiter">}</span> +<span id="L52" class="LineNr"> 52 </span> <span class="Conceal">¦</span> out << c<span class="Delimiter">;</span> +<span id="L53" class="LineNr"> 53 </span> <span class="Conceal">¦</span> <span class="Normal">if</span> <span class="Delimiter">(</span>c == <span class="cSpecial">'\n'</span><span class="Delimiter">)</span> <span class="Delimiter">{</span> +<span id="L54" class="LineNr"> 54 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> <span class="Identifier">return</span> <span class="Constant">true</span><span class="Delimiter">;</span> +<span id="L55" class="LineNr"> 55 </span> <span class="Conceal">¦</span> <span class="Delimiter">}</span> <span id="L56" class="LineNr"> 56 </span> <span class="Delimiter">}</span> <span id="L57" class="LineNr"> 57 </span> <span class="Identifier">return</span> <span class="Constant">false</span><span class="Delimiter">;</span> <span id="L58" class="LineNr"> 58 </span><span class="Delimiter">}</span> @@ -123,19 +124,19 @@ if ('onhashchange' in window) { <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#L235'>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="Normal">char</span> c = in<span class="Delimiter">.</span>get<span class="Delimiter">();</span> -<span id="L66" class="LineNr"> 66 </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> <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> -<span id="L68" class="LineNr"> 68 </span> <span class="Identifier">continue</span><span class="Delimiter">;</span> -<span id="L69" class="LineNr"> 69 </span> <span class="Delimiter">}</span> -<span id="L70" class="LineNr"> 70 </span> out << c<span class="Delimiter">;</span> -<span id="L71" class="LineNr"> 71 </span> <span class="Normal">if</span> <span class="Delimiter">(</span>c == <span class="Constant">'['</span><span class="Delimiter">)</span> ++brace_depth<span class="Delimiter">;</span> -<span id="L72" class="LineNr"> 72 </span> <span class="Normal">if</span> <span class="Delimiter">(</span>c == <span class="Constant">']'</span><span class="Delimiter">)</span> --brace_depth<span class="Delimiter">;</span> -<span id="L73" class="LineNr"> 73 </span> <span class="Normal">if</span> <span class="Delimiter">(</span>brace_depth == <span class="Constant">0</span><span class="Delimiter">)</span> <span class="Identifier">break</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> +<span id="L68" class="LineNr"> 68 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> <span class="Identifier">continue</span><span class="Delimiter">;</span> +<span id="L69" class="LineNr"> 69 </span> <span class="Conceal">¦</span> <span class="Delimiter">}</span> +<span id="L70" class="LineNr"> 70 </span> <span class="Conceal">¦</span> out << c<span class="Delimiter">;</span> +<span id="L71" class="LineNr"> 71 </span> <span class="Conceal">¦</span> <span class="Normal">if</span> <span class="Delimiter">(</span>c == <span class="Constant">'['</span><span class="Delimiter">)</span> ++brace_depth<span class="Delimiter">;</span> +<span id="L72" class="LineNr"> 72 </span> <span class="Conceal">¦</span> <span class="Normal">if</span> <span class="Delimiter">(</span>c == <span class="Constant">']'</span><span class="Delimiter">)</span> --brace_depth<span class="Delimiter">;</span> +<span id="L73" class="LineNr"> 73 </span> <span class="Conceal">¦</span> <span class="Normal">if</span> <span class="Delimiter">(</span>brace_depth == <span class="Constant">0</span><span class="Delimiter">)</span> <span class="Identifier">break</span><span class="Delimiter">;</span> <span id="L74" class="LineNr"> 74 </span> <span class="Delimiter">}</span> <span id="L75" class="LineNr"> 75 </span> <span class="Normal">if</span> <span class="Delimiter">(</span>!has_data<span class="Delimiter">(</span>in<span class="Delimiter">)</span> && brace_depth > <span class="Constant">0</span><span class="Delimiter">)</span> <span class="Delimiter">{</span> -<span id="L76" class="LineNr"> 76 </span> <a href='003trace.cc.html#L168'>raise</a> << <span class="Constant">"unbalanced '['</span><span class="cSpecial">\n</span><span class="Constant">"</span> << <a href='003trace.cc.html#L185'>end</a><span class="Delimiter">();</span> -<span id="L77" class="LineNr"> 77 </span> out<span class="Delimiter">.</span><a href='050scenario.cc.html#L60'>clear</a><span class="Delimiter">();</span> +<span id="L76" class="LineNr"> 76 </span> <span class="Conceal">¦</span> <a href='003trace.cc.html#L168'>raise</a> << <span class="Constant">"unbalanced '['</span><span class="cSpecial">\n</span><span class="Constant">"</span> << <a href='003trace.cc.html#L185'>end</a><span class="Delimiter">();</span> +<span id="L77" class="LineNr"> 77 </span> <span class="Conceal">¦</span> out<span class="Delimiter">.</span><a href='050scenario.cc.html#L60'>clear</a><span class="Delimiter">();</span> <span id="L78" class="LineNr"> 78 </span> <span class="Delimiter">}</span> <span id="L79" class="LineNr"> 79 </span><span class="Delimiter">}</span> <span id="L80" class="LineNr"> 80 </span> @@ -143,23 +144,23 @@ if ('onhashchange' in window) { <span id="L82" class="LineNr"> 82 </span><span class="Normal">void</span> <a href='014literal_string.cc.html#L82'>slurp_quoted_comment_aware</a><span class="Delimiter">(</span>istream& in<span class="Delimiter">,</span> ostream& out<span class="Delimiter">)</span> <span class="Delimiter">{</span> <span id="L83" class="LineNr"> 83 </span> <span class="Normal">char</span> c<span class="Delimiter">;</span> <span id="L84" class="LineNr"> 84 </span> <span class="Normal">while</span> <span class="Delimiter">(</span>in >> c<span class="Delimiter">)</span> <span class="Delimiter">{</span> -<span id="L85" class="LineNr"> 85 </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="L86" class="LineNr"> 86 </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> -<span id="L87" class="LineNr"> 87 </span> <span class="Identifier">continue</span><span class="Delimiter">;</span> -<span id="L88" class="LineNr"> 88 </span> <span class="Delimiter">}</span> -<span id="L89" class="LineNr"> 89 </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> out << c<span class="Delimiter">;</span> -<span id="L91" class="LineNr"> 91 </span> <span class="Normal">while</span> <span class="Delimiter">(</span><a href='001help.cc.html#L235'>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="Identifier">continue</span><span class="Delimiter">;</span> -<span id="L93" class="LineNr"> 93 </span> <span class="Delimiter">}</span> -<span id="L94" class="LineNr"> 94 </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="L95" class="LineNr"> 95 </span> in<span class="Delimiter">.</span>putback<span class="Delimiter">(</span>c<span class="Delimiter">);</span> -<span id="L96" class="LineNr"> 96 </span> <span class="Comment">// recurse</span> -<span id="L97" class="LineNr"> 97 </span> out << <a href='014literal_string.cc.html#L33'>slurp_quoted</a><span class="Delimiter">(</span>in<span class="Delimiter">);</span> -<span id="L98" class="LineNr"> 98 </span> <span class="Identifier">continue</span><span class="Delimiter">;</span> -<span id="L99" class="LineNr"> 99 </span> <span class="Delimiter">}</span> -<span id="L100" class="LineNr">100 </span> out << c<span class="Delimiter">;</span> -<span id="L101" class="LineNr">101 </span> <span class="Normal">if</span> <span class="Delimiter">(</span>c == <span class="Constant">']'</span><span class="Delimiter">)</span> <span class="Identifier">return</span><span class="Delimiter">;</span> +<span id="L85" class="LineNr"> 85 </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="L86" class="LineNr"> 86 </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> +<span id="L87" class="LineNr"> 87 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> <span class="Identifier">continue</span><span class="Delimiter">;</span> +<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#L235'>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> +<span id="L95" class="LineNr"> 95 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> in<span class="Delimiter">.</span>putback<span class="Delimiter">(</span>c<span class="Delimiter">);</span> +<span id="L96" class="LineNr"> 96 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> <span class="Comment">// recurse</span> +<span id="L97" class="LineNr"> 97 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> out << <a href='014literal_string.cc.html#L33'>slurp_quoted</a><span class="Delimiter">(</span>in<span class="Delimiter">);</span> +<span id="L98" class="LineNr"> 98 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> <span class="Identifier">continue</span><span class="Delimiter">;</span> +<span id="L99" class="LineNr"> 99 </span> <span class="Conceal">¦</span> <span class="Delimiter">}</span> +<span id="L100" class="LineNr">100 </span> <span class="Conceal">¦</span> out << c<span class="Delimiter">;</span> +<span id="L101" class="LineNr">101 </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="Identifier">return</span><span class="Delimiter">;</span> <span id="L102" class="LineNr">102 </span> <span class="Delimiter">}</span> <span id="L103" class="LineNr">103 </span> <a href='003trace.cc.html#L168'>raise</a> << <span class="Constant">"unbalanced '['</span><span class="cSpecial">\n</span><span class="Constant">"</span> << <a href='003trace.cc.html#L185'>end</a><span class="Delimiter">();</span> <span id="L104" class="LineNr">104 </span> out<span class="Delimiter">.</span><a href='050scenario.cc.html#L60'>clear</a><span class="Delimiter">();</span> @@ -181,7 +182,7 @@ if ('onhashchange' in window) { <span id="L120" class="LineNr">120 </span> <span id="L121" class="LineNr">121 </span><span class="Delimiter">:(after "string to_string(const reagent& r)")</span> <span id="L122" class="LineNr">122 </span> <span class="Normal">if</span> <span class="Delimiter">(</span><a href='014literal_string.cc.html#L126'>is_literal_text</a><span class="Delimiter">(</span>r<span class="Delimiter">))</span> -<span id="L123" class="LineNr">123 </span> <span class="Identifier">return</span> <a href='014literal_string.cc.html#L130'>emit_literal_string</a><span class="Delimiter">(</span>r<span class="Delimiter">.</span>name<span class="Delimiter">);</span> +<span id="L123" class="LineNr">123 </span> <span class="Conceal">¦</span> <span class="Identifier">return</span> <a href='014literal_string.cc.html#L130'>emit_literal_string</a><span class="Delimiter">(</span>r<span class="Delimiter">.</span>name<span class="Delimiter">);</span> <span id="L124" class="LineNr">124 </span> <span id="L125" class="LineNr">125 </span><span class="Delimiter">:(code)</span> <span id="L126" class="LineNr">126 </span><span class="Normal">bool</span> <a href='014literal_string.cc.html#L126'>is_literal_text</a><span class="Delimiter">(</span><span class="Normal">const</span> reagent& x<span class="Delimiter">)</span> <span class="Delimiter">{</span> @@ -191,14 +192,14 @@ if ('onhashchange' in window) { <span id="L130" class="LineNr">130 </span>string <a href='014literal_string.cc.html#L130'>emit_literal_string</a><span class="Delimiter">(</span>string name<span class="Delimiter">)</span> <span class="Delimiter">{</span> <span id="L131" class="LineNr">131 </span> <span class="Normal">size_t</span> pos = <span class="Constant">0</span><span class="Delimiter">;</span> <span id="L132" class="LineNr">132 </span> <span class="Normal">while</span> <span class="Delimiter">(</span>pos != string::npos<span class="Delimiter">)</span> -<span id="L133" class="LineNr">133 </span> pos = <a href='014literal_string.cc.html#L137'>replace</a><span class="Delimiter">(</span>name<span class="Delimiter">,</span> <span class="Constant">"</span><span class="cSpecial">\n</span><span class="Constant">"</span><span class="Delimiter">,</span> <span class="Constant">"</span><span class="cSpecial">\\</span><span class="Constant">n"</span><span class="Delimiter">,</span> pos<span class="Delimiter">);</span> +<span id="L133" class="LineNr">133 </span> <span class="Conceal">¦</span> pos = <a href='014literal_string.cc.html#L137'>replace</a><span class="Delimiter">(</span>name<span class="Delimiter">,</span> <span class="Constant">"</span><span class="cSpecial">\n</span><span class="Constant">"</span><span class="Delimiter">,</span> <span class="Constant">"</span><span class="cSpecial">\\</span><span class="Constant">n"</span><span class="Delimiter">,</span> pos<span class="Delimiter">);</span> <span id="L134" class="LineNr">134 </span> <span class="Identifier">return</span> <span class="Constant">"{</span><span class="cSpecial">\"</span><span class="Constant">"</span>+name+<span class="Constant">"</span><span class="cSpecial">\"</span><span class="Constant">: </span><span class="cSpecial">\"</span><span class="Constant">literal-string</span><span class="cSpecial">\"</span><span class="Constant">}"</span><span class="Delimiter">;</span> <span id="L135" class="LineNr">135 </span><span class="Delimiter">}</span> <span id="L136" class="LineNr">136 </span> <span id="L137" class="LineNr">137 </span><span class="Normal">size_t</span> <a href='014literal_string.cc.html#L137'>replace</a><span class="Delimiter">(</span>string& str<span class="Delimiter">,</span> <span class="Normal">const</span> string& from<span class="Delimiter">,</span> <span class="Normal">const</span> string& to<span class="Delimiter">,</span> <span class="Normal">size_t</span> n<span class="Delimiter">)</span> <span class="Delimiter">{</span> <span id="L138" class="LineNr">138 </span> <span class="Normal">size_t</span> result = str<span class="Delimiter">.</span>find<span class="Delimiter">(</span>from<span class="Delimiter">,</span> n<span class="Delimiter">);</span> <span id="L139" class="LineNr">139 </span> <span class="Normal">if</span> <span class="Delimiter">(</span>result != string::npos<span class="Delimiter">)</span> -<span id="L140" class="LineNr">140 </span> str<span class="Delimiter">.</span><a href='014literal_string.cc.html#L137'>replace</a><span class="Delimiter">(</span>result<span class="Delimiter">,</span> from<span class="Delimiter">.</span>length<span class="Delimiter">(),</span> to<span class="Delimiter">);</span> +<span id="L140" class="LineNr">140 </span> <span class="Conceal">¦</span> str<span class="Delimiter">.</span><a href='014literal_string.cc.html#L137'>replace</a><span class="Delimiter">(</span>result<span class="Delimiter">,</span> from<span class="Delimiter">.</span>length<span class="Delimiter">(),</span> to<span class="Delimiter">);</span> <span id="L141" class="LineNr">141 </span> <span class="Identifier">return</span> result<span class="Delimiter">;</span> <span id="L142" class="LineNr">142 </span><span class="Delimiter">}</span> <span id="L143" class="LineNr">143 </span> @@ -222,9 +223,9 @@ if ('onhashchange' in window) { <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#L235'>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="Normal">char</span> c = in<span class="Delimiter">.</span>get<span class="Delimiter">();</span> -<span id="L165" class="LineNr">165 </span> out << c<span class="Delimiter">;</span> -<span id="L166" class="LineNr">166 </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> +<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> <span id="L167" class="LineNr">167 </span> <span class="Delimiter">}</span> <span id="L168" class="LineNr">168 </span><span class="Delimiter">}</span> <span id="L169" class="LineNr">169 </span> @@ -267,8 +268,8 @@ if ('onhashchange' in window) { <span id="L206" class="LineNr">206 </span><span class="Delimiter">:(scenario string_literal_can_skip_past_comments)</span> <span id="L207" class="LineNr">207 </span><span class="muRecipe">def</span> <a href='000organization.cc.html#L113'>main</a> [ <span id="L208" class="LineNr">208 </span> copy [ -<span id="L209" class="LineNr">209 </span> <span class="Comment"># ']' inside comment</span> -<span id="L210" class="LineNr">210 </span> bar +<span id="L209" class="LineNr">209 </span> <span class="Conceal">¦</span> <span class="Comment"># ']' inside comment</span> +<span id="L210" class="LineNr">210 </span> <span class="Conceal">¦</span> bar <span id="L211" class="LineNr">211 </span> ] <span id="L212" class="LineNr">212 </span>] <span id="L213" class="LineNr">213 </span><span class="traceContains">+parse: ingredient: {"\n # ']' inside comment\n bar\n ": "literal-string"}</span> |