Branch: refs/heads/master Author: Jiří Techet techet@gmail.com Committer: GitHub noreply@github.com Date: Mon, 14 Mar 2022 19:15:18 UTC Commit: c83a616fe5ec9e9b98071fe8cc55425650062b76 https://github.com/geany/geany/commit/c83a616fe5ec9e9b98071fe8cc55425650062b...
Log Message: ----------- Merge pull request #3073 from techee/glsl
Use C parser for GLSL files
Modified Paths: -------------- ctags/parsers/geany_c.c data/filedefs/filetypes.CUDA.conf src/filetypes.c src/tagmanager/tm_parser.c src/tagmanager/tm_parser.h src/tagmanager/tm_parsers.h
Modified: ctags/parsers/geany_c.c 19 lines changed, 0 insertions(+), 19 deletions(-) =================================================================== @@ -267,7 +267,6 @@ static langType Lang_cpp; static langType Lang_csharp; static langType Lang_java; static langType Lang_d; -static langType Lang_glsl; static langType Lang_vala;
/* Used to index into the CKinds table. */ @@ -3197,12 +3196,6 @@ static void initializeDParser (const langType language) addKeyword ("version", language, KEYWORD_NAMESPACE); /* parse block */ }
-static void initializeGLSLParser (const langType language) -{ - Lang_glsl = language; - buildKeywordHash (language, 0); /* C keywords */ -} - static void initializeCsharpParser (const langType language) { Lang_csharp = language; @@ -3275,18 +3268,6 @@ extern parserDefinition* DParser (void) return def; }
-extern parserDefinition* GLSLParser (void) -{ - static const char *const extensions [] = { "glsl", "frag", "vert", NULL }; - parserDefinition* def = parserNew ("GLSL"); - def->kindTable = CKinds; - def->kindCount = ARRAY_SIZE (CKinds); - def->extensions = extensions; - def->parser2 = findCTags; - def->initialize = initializeGLSLParser; - return def; -} - extern parserDefinition* CsharpParser (void) { static const char *const extensions [] = { "cs", NULL };
Modified: data/filedefs/filetypes.CUDA.conf 2 lines changed, 1 insertions(+), 1 deletions(-) =================================================================== @@ -15,7 +15,7 @@ docComment=a addindex addtogroup anchor arg attention author authors b brief bug
[settings] lexer_filetype=C -tag_parser=C++ +tag_parser=CUDA
# default extension used when saving files extension=cu
Modified: src/filetypes.c 2 lines changed, 1 insertions(+), 1 deletions(-) =================================================================== @@ -137,7 +137,7 @@ static void init_builtin_filetypes(void) FT_INIT( BASIC, FREEBASIC, "FreeBasic", NULL, SOURCE_FILE, COMPILED ); FT_INIT( FORTRAN, FORTRAN, "Fortran", "Fortran (F90)", SOURCE_FILE, COMPILED ); FT_INIT( F77, F77, "F77", "Fortran (F77)", SOURCE_FILE, COMPILED ); - FT_INIT( GLSL, GLSL, "GLSL", NULL, SOURCE_FILE, COMPILED ); + FT_INIT( GLSL, C, "GLSL", NULL, SOURCE_FILE, COMPILED ); FT_INIT( CAML, NONE, "CAML", "(O)Caml", SOURCE_FILE, COMPILED ); FT_INIT( PERL, PERL, "Perl", NULL, SOURCE_FILE, SCRIPT ); FT_INIT( PHP, PHP, "PHP", NULL, SOURCE_FILE, SCRIPT );
Modified: src/tagmanager/tm_parser.c 8 lines changed, 4 insertions(+), 4 deletions(-) =================================================================== @@ -409,7 +409,7 @@ static TMParserMapEntry map_MATLAB[] = { {'s', tm_tag_struct_t}, };
-#define map_GLSL map_C_old_parser +#define map_CUDA map_C
/* not in universal-ctags */ static TMParserMapEntry map_VALA[] = { @@ -651,7 +651,7 @@ static TMParserMap parser_map[] = { MAP_ENTRY(REST), MAP_ENTRY(HTML), MAP_ENTRY(F77), - MAP_ENTRY(GLSL), + MAP_ENTRY(CUDA), MAP_ENTRY(MATLAB), MAP_ENTRY(VALA), MAP_ENTRY(ACTIONSCRIPT), @@ -1042,7 +1042,7 @@ const gchar *tm_parser_scope_separator(TMParserType lang) { case TM_PARSER_C: /* for C++ .h headers or C structs */ case TM_PARSER_CPP: - case TM_PARSER_GLSL: /* for structs */ + case TM_PARSER_CUDA: case TM_PARSER_PHP: case TM_PARSER_POWERSHELL: case TM_PARSER_RUST: @@ -1089,11 +1089,11 @@ gboolean tm_parser_has_full_scope(TMParserType lang) case TM_PARSER_ACTIONSCRIPT: case TM_PARSER_C: case TM_PARSER_CPP: + case TM_PARSER_CUDA: case TM_PARSER_CSHARP: case TM_PARSER_COBOL: case TM_PARSER_D: case TM_PARSER_GDSCRIPT: - case TM_PARSER_GLSL: case TM_PARSER_GO: case TM_PARSER_JAVA: case TM_PARSER_JAVASCRIPT:
Modified: src/tagmanager/tm_parser.h 2 lines changed, 1 insertions(+), 1 deletions(-) =================================================================== @@ -90,7 +90,7 @@ enum TM_PARSER_REST, TM_PARSER_HTML, TM_PARSER_F77, - TM_PARSER_GLSL, + TM_PARSER_CUDA, TM_PARSER_MATLAB, TM_PARSER_VALA, TM_PARSER_ACTIONSCRIPT,
Modified: src/tagmanager/tm_parsers.h 2 lines changed, 1 insertions(+), 1 deletions(-) =================================================================== @@ -46,7 +46,7 @@ RstParser, \ HtmlParser, \ F77Parser, \ - GLSLParser, \ + CUDAParser, \ MatLabParser, \ ValaParser, \ FlexParser, \
-------------- This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).