The GLSL portion of c.c doesn't seem to do anything - it's just a synonym for a C parser which can be used directly instead. This way we can switch to the new cxx parser for GLSL too and reduce one more language to care about in c.c.
For reference, the GLSL "parser" was introduced in commit
6ce421f1411060b8576bdac982cca11229b8ef96 You can view, comment on, or merge this pull request online at:
https://github.com/geany/geany/pull/3073
-- Commit Summary --
* Use C parser for GLSL files
-- File Changes --
M ctags/parsers/geany_c.c (19) M src/filetypes.c (2) M src/tagmanager/tm_parser.c (5) M src/tagmanager/tm_parser.h (1) M src/tagmanager/tm_parsers.h (1)
-- Patch Links --
https://github.com/geany/geany/pull/3073.patch https://github.com/geany/geany/pull/3073.diff
Hmm, GLSL has more keywords than C, maybe @b4n meant to add them to the parser but never got around to it.
But in current condition seems ok to switch. Could GLSL then be a custom filetype?
Hmm, GLSL has more keywords than C, maybe @b4n meant to add them to the parser but never got around to it.
Possibly. It's also possible that the other keywords of GLSL aren't so important for parsing (just for styling with scintilla) and that the output just turned out to be acceptable.
But in current condition seems ok to switch. Could GLSL then be a custom filetype?
I'm not so familiar with scintilla styling and there seems to be done something in the C code right now. In any case, it doesn't matter much and I think it can stay the way it is.
WFM with GLSL code from the web.
@techee pushed 1 commit.
a558daa05126fcb4e9d028244db7784401c69857 Keep a parser entry for removed GLSL parser for backwards compatibility
I used the UNUSED parser ID here like in the Ferite parser in order not to change other parser identifiers.
@techee pushed 1 commit.
e02db80ed66f813ddc758cbea68c0ae8b8dfdb32 Use C parser for GLSL files and CUDA parser for CUDA files
There was one more problem with this pull request - when C parser was used as a dummy parser for the removed entry, there were 2 different instances of the same parser in `tm_parsers.h` and since ctags uses a hash map for the used parsers, true C tags were reported incorrectly as the `UNUSED` tags. So better to use some parser we either don't use in Geany.
However, since we also support CUDA files as an external filetype, we can use the CUDA parser from the cxx parser instead of the C++ parser for CUDA files.
@techee pushed 1 commit.
0140add0eb2eb657d535b2e089b04cd1951b12cd Use C parser for GLSL files and CUDA parser for CUDA files
Had to rebase again because of the merge of GDScript filetype (added GDSCRIPT is alphabetically next to removed GLSL which caused the conflict).
Merged #3073 into master.
github-comments@lists.geany.org