Skip to content

Commit

Permalink
vim: accept protected methods starting from '_' and class constructor…
Browse files Browse the repository at this point in the history
…s like "new"

Signed-off-by: Masatake YAMATO <[email protected]>
  • Loading branch information
masatake committed Mar 13, 2024
1 parent 77d8da3 commit f642ed4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion parsers/vim.c
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,8 @@ static void parseFunction (const unsigned char *line, int parent, bool definedWi
if (*cp)
{
cp = skipPrefix (cp, &scope);
if (isupper (*cp) ||
if ((definedWithDEF && (*cp == '_' || isalpha (*cp))) ||
isupper (*cp) ||
scope == 's' || /* script scope */
scope == '<' || /* script scope */
scope == 'g' || /* global scope */
Expand Down

0 comments on commit f642ed4

Please sign in to comment.