[geany/geany] 8805f5: Use XTAG_ANONYMOUS in Fortran parser
Jiří Techet
git-noreply at xxxxx
Sat Feb 12 21:38:21 UTC 2022
Branch: refs/heads/master
Author: Jiří Techet <techet at gmail.com>
Committer: Jiří Techet <techet at gmail.com>
Date: Mon, 10 Jan 2022 20:44:13 UTC
Commit: 8805f56bbe14b218356c3ce4c2c3e318aecef251
https://github.com/geany/geany/commit/8805f56bbe14b218356c3ce4c2c3e318aecef251
Log Message:
-----------
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).
Modified Paths:
--------------
ctags/parsers/geany_fortran.c
Modified: ctags/parsers/geany_fortran.c
6 lines changed, 6 insertions(+), 0 deletions(-)
===================================================================
@@ -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);
--------------
This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).
More information about the Commits
mailing list