Branch: refs/heads/master Author: Jiří Techet techet@gmail.com Committer: Jiří Techet techet@gmail.com Date: Sat, 15 Jan 2022 18:55:06 UTC Commit: c9cb5e4fe2b715e3e407cb7a1d870d431e73ef7f https://github.com/geany/geany/commit/c9cb5e4fe2b715e3e407cb7a1d870d431e73ef...
Log Message: ----------- Remove Ferite parser from c.c
This language seems officially dead (last release from 2004, its "master site" link to www.ferite.org linking to a porn page, other mirrors dead and nearly no downloads from the Sourceforge site and those few are just probably from some bots). RIP.
Since we should try reduce differences against uctags and this language isn't worth submitting to uctags, I'd suggest to remove the support of its parser from c.c.
The filetype can still stay as it doesn't mean any maintenance cost for us.
For reference, Ferite parser was introduced in:
010d6581e5d567c5479f2ca643922a0ef6ccadf2
We need to keep original identifiers for parsers we want to keep so let's keep some dummy value for the removed parser (which can later be filled in by a newly added parser).
Modified Paths: -------------- ctags/parsers/geany_c.c src/filetypes.c src/tagmanager/tm_parser.c src/tagmanager/tm_parser.h src/tagmanager/tm_parsers.h
Modified: ctags/parsers/geany_c.c 36 lines changed, 5 insertions(+), 31 deletions(-) =================================================================== @@ -268,7 +268,6 @@ static langType Lang_csharp; static langType Lang_java; static langType Lang_d; static langType Lang_glsl; -static langType Lang_ferite; static langType Lang_vala;
/* Used to index into the CKinds table. */ @@ -1147,7 +1146,7 @@ static const char* accessField (const statementInfo *const st) { const char* result = NULL;
- if ((isInputLanguage (Lang_cpp) || isInputLanguage (Lang_d) || isInputLanguage (Lang_ferite)) && + if ((isInputLanguage (Lang_cpp) || isInputLanguage (Lang_d)) && st->scope == SCOPE_FRIEND) result = "friend"; else if (st->member.access != ACCESS_UNDEFINED) @@ -1198,7 +1197,7 @@ static void addOtherFields (tagEntryInfo* const tag, const tagType type, } if (st->implementation != IMP_DEFAULT && (isInputLanguage (Lang_cpp) || isInputLanguage (Lang_csharp) || isInputLanguage (Lang_vala) || - isInputLanguage (Lang_java) || isInputLanguage (Lang_d) || isInputLanguage (Lang_ferite))) + isInputLanguage (Lang_java) || isInputLanguage (Lang_d))) { tag->extensionFields.implementation = implementationString (st->implementation); @@ -1322,7 +1321,7 @@ static void addContextSeparator (vString *const scope) { if (isInputLanguage (Lang_c) || isInputLanguage (Lang_cpp)) vStringCatS (scope, "::"); - else if (isInputLanguage (Lang_java) || isInputLanguage (Lang_d) || isInputLanguage (Lang_ferite) || + else if (isInputLanguage (Lang_java) || isInputLanguage (Lang_d) || isInputLanguage (Lang_csharp) || isInputLanguage (Lang_vala)) vStringCatS (scope, "."); } @@ -1428,13 +1427,6 @@ static void makeTag (const tokenInfo *const token, vString *scope; tagEntryInfo e;
- /* take only functions which are introduced by "function ..." */ - if (type == TAG_FUNCTION && isInputLanguage (Lang_ferite) && - strncmp("function", st->firstToken->name->buffer, 8) != 0) - { - return; - } - initTagEntry (&e, vStringValue (token->name), kindIndexForType (type));
e.lineNumber = token->lineNumber; @@ -1927,7 +1919,7 @@ static void setAccess (statementInfo *const st, const accessType laccess) { if (isMember (st)) { - if (isInputLanguage (Lang_cpp) || isInputLanguage (Lang_d) || isInputLanguage (Lang_ferite)) + if (isInputLanguage (Lang_cpp) || isInputLanguage (Lang_d)) { int c = skipToNonWhite ();
@@ -2625,7 +2617,7 @@ static void addContext (statementInfo *const st, const tokenInfo* const token) if (isInputLanguage (Lang_c) || isInputLanguage (Lang_cpp)) vStringCatS (st->context->name, "::"); else if (isInputLanguage (Lang_java) || - isInputLanguage (Lang_d) || isInputLanguage (Lang_ferite) || + isInputLanguage (Lang_d) || isInputLanguage (Lang_csharp) || isInputLanguage (Lang_vala)) vStringCatS (st->context->name, "."); } @@ -3211,12 +3203,6 @@ static void initializeGLSLParser (const langType language) buildKeywordHash (language, 0); /* C keywords */ }
-static void initializeFeriteParser (const langType language) -{ - Lang_ferite = language; - buildKeywordHash (language, 1); /* C++ keywords */ -} - static void initializeCsharpParser (const langType language) { Lang_csharp = language; @@ -3301,18 +3287,6 @@ extern parserDefinition* GLSLParser (void) return def; }
-extern parserDefinition* FeriteParser (void) -{ - static const char *const extensions [] = { "fe", NULL }; - parserDefinition* def = parserNew ("Ferite"); - def->kindTable = CKinds; - def->kindCount = ARRAY_SIZE (CKinds); - def->extensions = extensions; - def->parser2 = findCTags; - def->initialize = initializeFeriteParser; - return def; -} - extern parserDefinition* CsharpParser (void) { static const char *const extensions [] = { "cs", NULL };
Modified: src/filetypes.c 2 lines changed, 1 insertions(+), 1 deletions(-) =================================================================== @@ -146,7 +146,7 @@ static void init_builtin_filetypes(void) FT_INIT( RUBY, RUBY, "Ruby", NULL, SOURCE_FILE, SCRIPT ); FT_INIT( TCL, TCL, "Tcl", NULL, SOURCE_FILE, SCRIPT ); FT_INIT( LUA, LUA, "Lua", NULL, SOURCE_FILE, SCRIPT ); - FT_INIT( FERITE, FERITE, "Ferite", NULL, SOURCE_FILE, SCRIPT ); + FT_INIT( FERITE, NONE, "Ferite", NULL, SOURCE_FILE, SCRIPT ); FT_INIT( HASKELL, HASKELL, "Haskell", NULL, SOURCE_FILE, COMPILED ); FT_INIT( MARKDOWN, MARKDOWN, "Markdown", NULL, SOURCE_FILE, MARKUP ); FT_INIT( TXT2TAGS, TXT2TAGS, "Txt2tags", NULL, SOURCE_FILE, MARKUP );
Modified: src/tagmanager/tm_parser.c 5 lines changed, 2 insertions(+), 3 deletions(-) =================================================================== @@ -402,7 +402,7 @@ static TMParserMapEntry map_F77[] = {
#define map_FORTRAN map_F77
-#define map_FERITE map_C_old_parser +#define map_UNUSED1 map_HASKELL
/* different parser than in universal-ctags */ static TMParserMapEntry map_MATLAB[] = { @@ -640,7 +640,7 @@ static TMParserMap parser_map[] = { MAP_ENTRY(SH), MAP_ENTRY(D), MAP_ENTRY(FORTRAN), - MAP_ENTRY(FERITE), + MAP_ENTRY(UNUSED1), MAP_ENTRY(DIFF), MAP_ENTRY(VHDL), MAP_ENTRY(LUA), @@ -1057,7 +1057,6 @@ gboolean tm_parser_has_full_context(TMParserType lang) case TM_PARSER_CSHARP: case TM_PARSER_COBOL: case TM_PARSER_D: - case TM_PARSER_FERITE: case TM_PARSER_GDSCRIPT: case TM_PARSER_GLSL: case TM_PARSER_GO:
Modified: src/tagmanager/tm_parser.h 2 lines changed, 1 insertions(+), 1 deletions(-) =================================================================== @@ -78,7 +78,7 @@ enum TM_PARSER_SH, TM_PARSER_D, TM_PARSER_FORTRAN, - TM_PARSER_FERITE, + TM_PARSER_UNUSED1, TM_PARSER_DIFF, TM_PARSER_VHDL, TM_PARSER_LUA,
Modified: src/tagmanager/tm_parsers.h 2 lines changed, 1 insertions(+), 1 deletions(-) =================================================================== @@ -34,7 +34,7 @@ ShParser, \ DParser, \ FortranParser, \ - FeriteParser, \ + LiterateHaskellParser, /* dummy for removed Ferite parser */ \ DiffParser, \ VhdlParser, \ LuaParser, \
-------------- This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).