From 8805f56bbe14b218356c3ce4c2c3e318aecef251 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Ji=C5=99=C3=AD=20Techet?= Date: Mon, 6 Dec 2021 22:10:45 +0100 Subject: [PATCH] Use XTAG_ANONYMOUS in Fortran parser Report anonymous tags using XTAG_ANONYMOUS. These anonymous tags aren't generated by the upstream uctags parser so this change hasn't been made available there (will have to be part of some future sync). --- ctags/parsers/geany_fortran.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/ctags/parsers/geany_fortran.c b/ctags/parsers/geany_fortran.c index 79a6180f4..59a9ff50d 100644 --- a/ctags/parsers/geany_fortran.c +++ b/ctags/parsers/geany_fortran.c @@ -190,6 +190,7 @@ typedef struct sTokenInfo { struct sTokenInfo *secondary; unsigned long lineNumber; MIOPos filePosition; + bool anonymous; } tokenInfo; /* @@ -430,6 +431,7 @@ static tokenInfo *newToken (void) token->secondary = NULL; token->lineNumber = getInputLineNumber (); token->filePosition = getInputFilePosition (); + token->anonymous = false; return token; } @@ -447,6 +449,7 @@ static tokenInfo *newAnonTokenFrom (tokenInfo *const token, const char *type) { char buffer[64]; tokenInfo *result = newTokenFrom (token); + result->anonymous = true; sprintf (buffer, "%s#%u", type, contextual_fake_count++); vStringClear (result->string); vStringCatS (result->string, buffer); @@ -492,6 +495,9 @@ static void makeFortranTag (tokenInfo *const token, tagType tag) if (token->tag == TAG_COMMON_BLOCK) e.lineNumberEntry = canUseLineNumberAsLocator(); + if (token->anonymous) + markTagExtraBit (&e, XTAG_ANONYMOUS); + e.lineNumber = token->lineNumber; e.filePosition = token->filePosition; e.isFileScope = isFileScope (token->tag); -- 2.11.4.GIT