If a variable name ends with "type", the symbol parser recognizes a symbol which does not exist. As an example, see the following code below:
procedure plot_labels(iy,iy2: stipint; labtype: stipint);
const c_marker_type=1; var locdbg: boolean; {actual code} end;
Which creates two functions: plot_labels (correct) and 1 (this is incorrect). See screenshot below:
![image](https://cloud.githubusercontent.com/assets/7198614/23316826/4c7ebeee-facc-11...)
It seems not only to be if ends in `type` but it seems to have to end in `type=X;`. If you change `type`, or remove the `=` or remove the `X` (or number or whatever), or remove the `;` it works normally. I tried looking at the Pascal parser but it's really weird, would be easier to re-write it from scratch than decode it.
@peter-scholtens BTW, I think this parser is the same as in [Universal CTags](https://github.com/universal-ctags/ctags/blob/master/parsers/pascal.c), it might get more attention if reported there (for example by generating an invalid tag file ctags directly).
No its not the same, the ctags one is missing the part at line 258 where it tests for "type" which is likely the problem.
I tried looking at the Pascal parser but it's really weird,
See the comment "Algorithm adapted from from GNU etags." gives the game away :)
Pascal doesn't seem to be part of the omnibus ctags sync PR #1263 either for some reason (@techee ?)
@elextr good eye on the difference, seems that was added in 72b7390e6c8eb66c373ed3e6dde82fca57af0ab2, and based on the commit message it was added to solve the exact problem it causes?
@elextr The aim of #1263 isn't to sync parsers - with parsers sync it would be MUCH bigger. It just makes Geany ready so we can use all uctags features in parsers. Parsers will be synced next (but this will fortunately be possible one by one so no huge pull requests any more).
@techee ok
Of course taking out https://github.com/geany/geany/commit/72b7390e6c8eb66c373ed3e6dde82fca57af0a... will again expose whatever problem it was fixing.
Closed #1409.
Seems to be fixed with the latest pascal parser.
github-comments@lists.geany.org