<div dir="ltr"><div class="gmail_default" style>Looks good.</div><div class="gmail_default"><br></div><div class="gmail_default">   LT_VirtualFunctionDecl,</div><div class="gmail_default">-  LT_ObjCMethodDecl</div><div class="gmail_default">
+  LT_ObjCMethodDecl,</div><div class="gmail_default">+  LT_ObjCDecl // An @interface, @implementation, or @protocol line.</div><div class="gmail_default" style><br></div><div class="gmail_default" style>Note that I have sorted these alphabetically now. Sorry in advance for the conflict.</div>
</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Jan 10, 2013 at 2:34 AM, Nico Weber <span dir="ltr"><<a href="mailto:thakis@chromium.org" target="_blank">thakis@chromium.org</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
<br>
the attached patch changes the formatting of `@interface Foo(Bar)` to<br>
`@interface (Bar)`, as requested by Jordy.<br>
<br>
I'm doing this by letting TokenAnnotator::determineTokenTypes() set<br>
the Type of the first token in a line to TT_ObjCDecl if the line<br>
starts with @interface, @implementation, or @protocol, and then<br>
havingTokenAnnotator::annotate() change the CurrentLineType to<br>
LT_ObjCDecl if the line's first token's Type is TT_ObjCDecl. This is a<br>
bit roundabout, but seems to match how LT_ObjCMethodDecl is set.<br>
<br>
Once that's done, TokenAnnotator::spaceRequiredBetween(lhs, rhs) just<br>
returns true if the rhs is a '(' and the CurrentLineType is<br>
LT_ObjCDecl.<br>
<br>
Does this look like the right way to go about things?<br>
<span class="HOEnZb"><font color="#888888"><br>
Nico<br>
</font></span><br>_______________________________________________<br>
cfe-commits mailing list<br>
<a href="mailto:cfe-commits@cs.uiuc.edu">cfe-commits@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits</a><br>
<br></blockquote></div><br></div>