I came up with this:
(?:\s+throw\s*\([^\)]*\))?\s* # optional throw
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:
int Foo::Bar(int parameter) const throw()
/* ... */
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.
On 8/27/07, Allan Odgaard <throw-away-1(a)macromates.com> wrote:
On Aug 27, 2007, at 12:55 AM, Marc-Antoine Courteau wrote:
When I use the throw keyword on my method declarations, the method
detected by TextMate is "throw", which isn't really useful,
all the method names are detected as "throw". How can I fix this to
TextMates resolves the proper names?
Bundles -> Bundle Editor -> Edit Languages…
There is a large pattern (regexp) to match (member) function
(implementations/declarations) in the C and C++ grammars, this/these
patterns would be expanded to also deal with throw.
I don't think the change is too difficult -- do let me know if you
add it, and I can roll it into the official language grammar.
For new threads USE THIS: textmate(a)lists.macromates.com
(threading gets destroyed and the universe will collapse if you don't)