To correctly rename anonymous tags the tag renaming function had to be updated for a special case in Fortran - see the commit for more details.
I also updated 2 unit tests which (I believe) contained invalid Fortran code the new parser didn't handle. You can view, comment on, or merge this pull request online at:
https://github.com/geany/geany/pull/3160
-- Commit Summary --
* Fix anonymous tag renaming for Fortran structures * Use the upstream Fortran parser * Update unit tests
-- File Changes --
M ctags/Makefile.am (2) R ctags/parsers/fortran.c (744) M meson.build (2) M src/filetypes.c (2) M src/tagmanager/tm_ctags.c (16) M src/tagmanager/tm_parser.c (22) M src/tagmanager/tm_parser.h (2) M src/tagmanager/tm_parsers.h (2) M tests/ctags/bug565813.f90.tags (4) M tests/ctags/bug670433.f90.tags (2) M tests/ctags/bug726712.f90.tags (6) M tests/ctags/enum.f90.tags (26) M tests/ctags/forall_module.f90.tags (2) M tests/ctags/fortran_associate.f90.tags (2) M tests/ctags/members.f90 (4) M tests/ctags/members.f90.tags (2) M tests/ctags/numlib.f90.tags (1) M tests/ctags/procedure_pointer_module.f90.tags (2) M tests/ctags/qualified_types.f90 (4) M tests/ctags/square_parens.f90.tags (2) M tests/ctags/stdcall.f.tags (4) M tests/ctags/structure.f.tags (2)
-- Patch Links --
https://github.com/geany/geany/pull/3160.patch https://github.com/geany/geany/pull/3160.diff
One more thing worth noting here is that previously there were 2 fortran parsers - F77 and FORTRAN. There's just a single after this PR which parses both dialects and TM_PARSER_F77 is set to some dummy value which can be replaced by some new parser (which could be for instance #3157).
The `kind` and `len` attributes in the tests are legal in newer Fortrans, eg 2003, see https://wg5-fortran.org/N1601-N1650/N1601.pdf section 4.5.2. [end language lawyering]
I guess someone had added them to allow newer Fortrans to be parsed. They will need to re-add them upstream.
@elextr Thanks for digging this out - I was aware of the commit which however didn't explain exactly what was going on but the specification clarifies it. I'll prepare a patch for the upstream version and update this PR afterwards.
@techee pushed 1 commit.
3c26b21e89c93859b3e76aa17c1e648bacb682c7 fixup! Update unit tests
Done, the change has been upstreamed so I updated the parser and the unit tests.
@elextr Anything left here here to be fixed or does it look OK to you?
LGB(quick)I, tests pass, some symbols show for random fortran from the interweb.
Merged #3160 into master.
github-comments@lists.geany.org