[geany/geany] 6671d3: Merge pull request #3075 from techee/remove_ferite_parser

Jiří Techet git-noreply at xxxxx
Mon Mar 14 18:41:29 UTC 2022


Branch:      refs/heads/master
Author:      Jiří Techet <techet at gmail.com>
Committer:   GitHub <noreply at github.com>
Date:        Mon, 14 Mar 2022 18:41:29 UTC
Commit:      6671d3c3145e0beaa5af4f4c6fafd884fd658904
             https://github.com/geany/geany/commit/6671d3c3145e0beaa5af4f4c6fafd884fd658904

Log Message:
-----------
Merge pull request #3075 from techee/remove_ferite_parser

Remove Ferite filetype


Modified Paths:
--------------
    ctags/parsers/geany_c.c
    data/Makefile.am
    data/filedefs/filetypes.ferite
    data/filetype_extensions.conf
    data/snippets.conf
    src/filetypes.c
    src/filetypes.h
    src/highlighting.c
    src/highlightingmappings.h
    src/msgwindow.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: data/Makefile.am
1 lines changed, 0 insertions(+), 1 deletions(-)
===================================================================
@@ -30,7 +30,6 @@ filetypes_dist = \
 	filedefs/filetypes.docbook \
 	filedefs/filetypes.erlang \
 	filedefs/filetypes.f77 \
-	filedefs/filetypes.ferite \
 	filedefs/filetypes.forth \
 	filedefs/filetypes.fortran \
 	filedefs/filetypes.freebasic \


Modified: data/filedefs/filetypes.ferite
46 lines changed, 0 insertions(+), 46 deletions(-)
===================================================================
@@ -1,46 +0,0 @@
-# For complete documentation of this file, please see Geany's main documentation
-[styling=C]
-
-[keywords]
-# all items must be in one line
-primary=false null self super true abstract alias and arguments attribute_missing break case class closure conformsToProtocol constructor continue default deliver destructor diliver directive do else extends eval final fix for function global handle if iferr implements include instanceof isa method_missing modifies monitor namespace new or private protected protocol public raise recipient rename return static switch uses using while
-types=boolean string number array object void XML Unix Sys String Stream Serialize RMI Posix Number Network Math FileSystem Console Array Regexp XSLT
-docComment=brief class declaration description end example extends function group implements modifies module namespace param protocol return return static type variable warning
-
-[lexer_properties=C]
-
-[settings]
-# default extension used when saving files
-extension=fe
-
-# the following characters are these which a "word" can contains, see documentation
-#wordchars=_abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789
-
-# single comments, like # in this file
-comment_single=//
-# multiline comments
-comment_open=/*
-comment_close=*/
-
-# set to false if a comment character/string should start at column 0 of a line, true uses any
-# indentation of the line, e.g. setting to true causes the following on pressing CTRL+d
-	#command_example();
-# setting to false would generate this
-#	command_example();
-# This setting works only for single line comments
-comment_use_indent=true
-
-# context action command (please see Geany's main documentation for details)
-context_action_cmd=
-
-[indentation]
-#width=4
-# 0 is spaces, 1 is tabs, 2 is tab & spaces
-#type=1
-
-[build_settings]
-# %f will be replaced by the complete filename
-# %e will be replaced by the filename without extension
-# (use only one of it at one time)
-compiler=ferite -vc "%f"
-run_cmd=ferite "%f"


Modified: data/filetype_extensions.conf
1 lines changed, 0 insertions(+), 1 deletions(-)
===================================================================
@@ -28,7 +28,6 @@ Diff=*.diff;*.patch;*.rej;
 Docbook=*.docbook;
 Erlang=*.erl;*.hrl;
 F77=*.f;*.for;*.ftn;*.f77;*.F;*.FOR;*.FTN;*.fpp;*.FPP;
-Ferite=*.fe;
 Forth=*.fs;*.fth;
 Fortran=*.f90;*.f95;*.f03;*.f08;*.F90;*.F95;*.F03;*.F08;
 FreeBasic=*.bas;*.bi;*.vbs;


Modified: data/snippets.conf
4 lines changed, 0 insertions(+), 4 deletions(-)
===================================================================
@@ -119,10 +119,6 @@ with=with %cursor%:\n\t
 def=def %cursor% (%cursor%):\n\t""" Function doc """\n\t
 class=class %cursor%:\n\t""" Class doc """\n\t\n\tdef __init__ (self):\n\t\t""" Class initialiser """\n\t\tpass
 
-[Ferite]
-iferr=iferr%block_cursor%fix%block%
-monitor=monitor%block_cursor%handle%block%
-
 [Haskell]
 
 [HTML]


Modified: src/filetypes.c
3 lines changed, 1 insertions(+), 2 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( GDSCRIPT,   GDSCRIPT,     "GDScript",         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   );
@@ -188,7 +188,6 @@ static void init_builtin_filetypes(void)
 	FT_INIT( ZEPHIR,     ZEPHIR,       "Zephir",           NULL,                      SOURCE_FILE, COMPILED );
 	FT_INIT( SMALLTALK,  NONE,         "Smalltalk",        NULL,                      SOURCE_FILE, SCRIPT   );
 	FT_INIT( JULIA,      JULIA,        "Julia",            NULL,                      SOURCE_FILE, SCRIPT   );
-	FT_INIT( GDSCRIPT,   GDSCRIPT,     "GDScript",         NULL,                      SOURCE_FILE, SCRIPT   );
 }
 
 


Modified: src/filetypes.h
3 lines changed, 1 insertions(+), 2 deletions(-)
===================================================================
@@ -50,7 +50,7 @@ typedef enum
 	GEANY_FILETYPES_MATLAB,
 	GEANY_FILETYPES_RUBY,
 	GEANY_FILETYPES_LUA,
-	GEANY_FILETYPES_FERITE,
+	GEANY_FILETYPES_GDSCRIPT,
 	GEANY_FILETYPES_YAML,
 	GEANY_FILETYPES_C,
 	GEANY_FILETYPES_NSIS,
@@ -108,7 +108,6 @@ typedef enum
 	GEANY_FILETYPES_BIBTEX,
 	GEANY_FILETYPES_SMALLTALK,
 	GEANY_FILETYPES_JULIA,
-	GEANY_FILETYPES_GDSCRIPT,
 	/* ^ append items here */
 	GEANY_MAX_BUILT_IN_FILETYPES	/* Don't use this, use filetypes_array->len instead */
 }


Modified: src/highlighting.c
2 lines changed, 0 insertions(+), 2 deletions(-)
===================================================================
@@ -1016,7 +1016,6 @@ void highlighting_init_styles(guint filetype_idx, GKeyFile *config, GKeyFile *co
 		init_styleset_case(LISP);
 		init_styleset_case(ERLANG);
 		init_styleset_case(DOCBOOK);
-		init_styleset_case(FERITE);
 		init_styleset_case(F77);
 		init_styleset_case(FORTH);
 		init_styleset_case(FORTRAN);
@@ -1108,7 +1107,6 @@ void highlighting_set_styles(ScintillaObject *sci, GeanyFiletype *ft)
 		styleset_case(LISP);
 		styleset_case(ERLANG);
 		styleset_case(DOCBOOK);
-		styleset_case(FERITE);
 		styleset_case(F77);
 		styleset_case(FORTH);
 		styleset_case(FORTRAN);


Modified: src/highlightingmappings.h
12 lines changed, 0 insertions(+), 12 deletions(-)
===================================================================
@@ -639,18 +639,6 @@ static const HLKeyword highlighting_keywords_F77[] =
 #define highlighting_properties_F77		EMPTY_PROPERTIES
 
 
-/* Ferite */
-#define highlighting_lexer_FERITE		SCLEX_CPP
-#define highlighting_styles_FERITE		highlighting_styles_C
-static const HLKeyword highlighting_keywords_FERITE[] =
-{
-	{ 0, "primary",		FALSE },
-	{ 1, "types",		FALSE },
-	{ 2, "docComment",	FALSE }
-};
-#define highlighting_properties_FERITE	highlighting_properties_C
-
-
 /* Forth */
 #define highlighting_lexer_FORTH		SCLEX_FORTH
 static const HLStyle highlighting_styles_FORTH[] =


Modified: src/msgwindow.c
20 lines changed, 0 insertions(+), 20 deletions(-)
===================================================================
@@ -1008,26 +1008,6 @@ static void parse_compiler_error_line(const gchar *string,
 			}
 			break;
 		}
-		case GEANY_FILETYPES_FERITE:
-		{
-			/* Error: Parse Error: on line 5 in "/tmp/hello.fe"
-			 * Error: Compile Error: on line 24, in /test/class.fe */
-			if (strncmp(string, "Error: Compile Error", 20) == 0)
-			{
-				data.pattern = " ";
-				data.min_fields = 8;
-				data.line_idx = 5;
-				data.file_idx = 7;
-			}
-			else
-			{
-				data.pattern = " \"";
-				data.min_fields = 10;
-				data.line_idx = 5;
-				data.file_idx = 8;
-			}
-			break;
-		}
 		case GEANY_FILETYPES_HTML:
 		{
 			/* line 78 column 7 - Warning: <table> missing '>' for end of tag */


Modified: src/tagmanager/tm_parser.c
6 lines changed, 1 insertions(+), 5 deletions(-)
===================================================================
@@ -403,8 +403,6 @@ static TMParserMapEntry map_F77[] = {
 
 #define map_FORTRAN map_F77
 
-#define map_FERITE map_C_old_parser
-
 /* different parser than in universal-ctags */
 static TMParserMapEntry map_MATLAB[] = {
 	{'f', tm_tag_function_t},
@@ -641,7 +639,7 @@ static TMParserMap parser_map[] = {
 	MAP_ENTRY(SH),
 	MAP_ENTRY(D),
 	MAP_ENTRY(FORTRAN),
-	MAP_ENTRY(FERITE),
+	MAP_ENTRY(GDSCRIPT),
 	MAP_ENTRY(DIFF),
 	MAP_ENTRY(VHDL),
 	MAP_ENTRY(LUA),
@@ -674,7 +672,6 @@ static TMParserMap parser_map[] = {
 	MAP_ENTRY(POWERSHELL),
 	MAP_ENTRY(JULIA),
 	MAP_ENTRY(CPREPROCESSOR),
-	MAP_ENTRY(GDSCRIPT),
 };
 /* make sure the parser map is consistent and complete */
 G_STATIC_ASSERT(G_N_ELEMENTS(parser_map) == TM_PARSER_COUNT);
@@ -1095,7 +1092,6 @@ gboolean tm_parser_has_full_scope(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
3 lines changed, 1 insertions(+), 2 deletions(-)
===================================================================
@@ -78,7 +78,7 @@ enum
 	TM_PARSER_SH,
 	TM_PARSER_D,
 	TM_PARSER_FORTRAN,
-	TM_PARSER_FERITE,
+	TM_PARSER_GDSCRIPT,
 	TM_PARSER_DIFF,
 	TM_PARSER_VHDL,
 	TM_PARSER_LUA,
@@ -112,7 +112,6 @@ enum
 	TM_PARSER_JULIA,
 	TM_PARSER_BIBTEX,
 	TM_PARSER_CPREPROCESSOR,
-	TM_PARSER_GDSCRIPT,
 	TM_PARSER_COUNT
 };
 


Modified: src/tagmanager/tm_parsers.h
5 lines changed, 2 insertions(+), 3 deletions(-)
===================================================================
@@ -34,7 +34,7 @@
 	ShParser, \
 	DParser, \
 	FortranParser, \
-	FeriteParser, \
+	GDScriptParser, \
 	DiffParser, \
 	VhdlParser, \
 	LuaParser, \
@@ -67,7 +67,6 @@
 	PowerShellParser, \
 	JuliaParser, \
 	BibtexParser, \
-	CPreProParser, \
-	GDScriptParser
+	CPreProParser
 
 #endif



--------------
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