I came up with this:<br><br> (?:\s+throw\s*\([^\)]*\))?\s* # optional throw modifier<br><br>to place between the "optional const modifier" and "start bracket or end-of-line" bor both
meta.function.c and meta.function.prototype.c; however it only works when the "const" specifier isn't part of the method, such as in this case:<br><br>int Foo::Bar(int parameter) const throw()<br>{<br> /* ... */
<br>}<br><br>I'm not a regex guru so there's probably something I'm doing wrong. Any input to fix this completely would be greatly appreciated.<br><br>Marc-Antoine Courteau<br><br><div><span class="gmail_quote">
On 8/27/07, <b class="gmail_sendername">Allan Odgaard</b> <<a href="mailto:throw-away-1@macromates.com">throw-away-1@macromates.com</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
On Aug 27, 2007, at 12:55 AM, Marc-Antoine Courteau wrote:<br><br>> [...]<br>> When I use the throw keyword on my method declarations, the method<br>> name<br>> detected by TextMate is "throw", which isn't really useful,
<br>> especially when<br>> all the method names are detected as "throw". How can I fix this to<br>> ensure<br>> TextMates resolves the proper names?<br><br>Bundles -> Bundle Editor -> Edit Languages…
<br><br>There is a large pattern (regexp) to match (member) function<br>(implementations/declarations) in the C and C++ grammars, this/these<br>patterns would be expanded to also deal with throw.<br><br>I don't think the change is too difficult -- do let me know if you
<br>add it, and I can roll it into the official language grammar.<br><br><br>______________________________________________________________________<br>For new threads USE THIS: <a href="mailto:textmate@lists.macromates.com">
textmate@lists.macromates.com</a><br>(threading gets destroyed and the universe will collapse if you don't)<br><a href="http://lists.macromates.com/mailman/listinfo/textmate">http://lists.macromates.com/mailman/listinfo/textmate
</a><br></blockquote></div><br><br clear="all"><br>-- <br>Marc-Antoine<br><a href="mailto:macourteau@gmail.com">macourteau@gmail.com</a>