<div>FYI, I'll try to comment later on some of the details of these syntaxes, but this is something I've wanted to look into as well.</div><div><br></div><div>Currently I'm working on refactorings to the text diagnostic printer that should make experimenting with these alternate syntaxes much much more reasonable.</div>
<br><div class="gmail_quote">On Mon, Aug 22, 2011 at 10:16 AM, David Blaikie <span dir="ltr"><<a href="mailto:dblaikie@gmail.com">dblaikie@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div>Thanks - that's (2) at least. Following on from the bug discussion I think it'd be a pity to drop the fixit entirely - though better than having it broken like that, sure.<br><br>Could we toss around some alternative syntax options & see what people think?<br>

<br><span style="font-family:Verdana, sans-serif;background-color:rgb(255, 255, 255)"><pre style="font-size:medium;font-family:monospace;white-space:pre-wrap;width:50em">A var = { b};
          ^
          s)atic_cast<unsigned int>(</pre><pre style="font-size:medium;font-family:monospace;white-space:pre-wrap;width:50em">One option would be to just suggest the whole replacement (not by changing the FixIt emitted - that should remain the same so it's fully descriptive for other tools. But just to change the way its rendered):</pre>

</span><span style="font-family:Verdana, sans-serif;background-color:rgb(255, 255, 255)"><pre style="font-size:medium;font-family:monospace;white-space:pre-wrap;width:50em">A var = { b};
          ^
          static_cast<unsigned int>(b)</pre><pre style="font-size:medium;font-family:monospace;white-space:pre-wrap;width:50em">or somehow attach the start & end separately:</pre>
</span><span style="font-family:Verdana, sans-serif;background-color:rgb(255, 255, 255)"><pre style="font-size:medium;font-family:monospace;white-space:pre-wrap;width:50em">A var = { b};
          ^^-------------------------\
          static_cast<unsigned int>( )</pre><pre style="font-size:medium;font-family:monospace;white-space:pre-wrap;width:50em">Though that doesn't really scale up to more than one overlap. (which might be sufficient to cover more/most cases like this)</pre>

</span><span style="font-family:Verdana, sans-serif;background-color:rgb(255, 255, 255)"><pre style="font-size:medium;font-family:monospace;white-space:pre-wrap;width:50em">A simple separated list (could benefit from color highlighting, but we wouldn't want to depend on that)</pre>
</span><span style="font-family:Verdana, sans-serif;background-color:rgb(255, 255, 255)"><pre style="font-size:medium;font-family:monospace;white-space:pre-wrap;width:50em">A var = { b};
          ^^
          static_cast<unsigned int>( )</pre><pre style="font-size:medium;font-family:monospace;white-space:pre-wrap;width:50em">Is there any good separator we could use in this list that wouldn't get confused with the actual replacement text?

(could we even render fixits completely differently in the presence of terminal colors? </pre></span><span style="font-family:Verdana, sans-serif;background-color:rgb(255, 255, 255)"><pre style="font-size:medium;font-family:monospace;white-space:pre-wrap;width:50em">
A var = { <b><font color="#009900">static_cast<unsigned int>(</font></b>b<b><font color="#33cc00">)</font></b>};</pre><pre style="font-size:medium;font-family:monospace;white-space:pre-wrap;width:50em"><span>Though I suppose this doesn't account for replacements (where we'd want to show the old & the new text) in which case we could pad the original text:
</span></pre></span><span style="font-family:Verdana, sans-serif;background-color:rgb(255, 255, 255)"><pre style="font-size:medium;font-family:monospace;white-space:pre-wrap;width:50em">A var = { <font style="font-weight:bold" color="#cc0000">foo   </font>(b)};
          <font color="#009900">foobar
</font></pre><pre style="font-size:medium;font-family:monospace;white-space:pre-wrap;width:50em">)</pre><pre style="font-size:medium;font-family:monospace;white-space:pre-wrap;width:50em"></pre></span></div></blockquote>
</div><br>