Branch: refs/heads/master Author: Jiří Techet techet@gmail.com Committer: Jiří Techet techet@gmail.com Date: Sat, 27 Apr 2024 18:54:32 UTC Commit: 27659bdef5000de4cdf79ca0c154f7c9ad1dcd01 https://github.com/geany/geany/commit/27659bdef5000de4cdf79ca0c154f7c9ad1dcd...
Log Message: ----------- Disable roles for macro kinds in C/C++
When role kinds are enabled, they report tags also for checks like
#ifdef MY_MACRO
in which we are not interested.
Modified Paths: -------------- src/tagmanager/tm_parser.c
Modified: src/tagmanager/tm_parser.c 7 lines changed, 5 insertions(+), 2 deletions(-) =================================================================== @@ -1557,13 +1557,16 @@ gboolean tm_parser_enable_role(TMParserType lang, gchar kind) { switch (lang) { + case TM_PARSER_C: + case TM_PARSER_CPP: + return kind != 'd'; case TM_PARSER_GDSCRIPT: - return kind == 'c' ? FALSE : TRUE; + return kind != 'c'; case TM_PARSER_GO: /* 'p' is used both for package definition tags and imported package * tags and we can't tell which is which just by kind. By disabling * roles for this kind, we only get package definition tags. */ - return kind == 'p' ? FALSE : TRUE; + return kind != 'p'; } return TRUE; }
-------------- This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).