Re: xfuncname problems with C++
- From
Jonathan Nieder <jrnieder@gmail.com>
- Date
- Jan 2, 2015, 22:05 UTC
- Message-ID
- <20150102220556.GH29365@google.com>
- In-Reply-To
- <CAHd499DpyO6Csji8gp1E6HsrvtBa7QMKBah2xOewrWAfNgQUHg@mail.gmail.com>
Robert Dailey wrote:
> The 'void' does not start on the leftmost column, due to tabbing there > can be any number of whitespace (the regex should account for this).
Ah, that explains it. The default C++ pattern assumes the 'void' starts at the leftmost column, so that the funcname header represents whatever top-level construct forms the context (e.g., "class foo {").
(Jump targets or access declarations) !^[ \t]*[A-Za-z_][A-Za-z_0-9]*:[[:space:]]*($|/[/*])
(functions/methods, variables, and compounds at top level) ^((::[[:space:]]*)?[A-Za-z_].*)$
Thanks, Jonathan