New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use some parsers from uctags with better implementation #3035
Conversation
yeah, some contributors were improving them when there was no upstream. But they stopped before an upstream became available. Probably would be nice to share upstream. |
The "better" part is mostly the ability of Geany's c.c to give return type of functions and types of global variables which is missing in the upstream c.c. The problem is that this is done in a rather hacky way to just record the part that might be a type in the preprocessor, keeping it completely unparsed, cleaning it from possible comments inside, and then presenting it as a type. The upstream c.c. is using a different preprocessor ( |
Ok, fair enough, its only nice to share if its any good. |
Once all the parsers are merged, I'm planning to create a new issue replacing #1162 where I would describe what is remaining in the sync and what the differences are in the parsers and possibly involve the maintainer of uctags in the discussion. |
To clarify, I meant the currently pending pull requests here. |
Does that include the ones with the Here be Dragons ( |
No, just those worry-free "ctags parser" 10KLOC+ PRs :-). |
The uctags R parser is token-based and seems to be much more advanced than our ad-hoc parser.
The parser is also only line-based but seems to handle many more things than our sh parser.
The new parser is token-based and appears to be significantly improved.
The difference seems to be the scope information produced by the new parsers.
53a5b7d
to
7396613
Compare
Parsers for R and verilog from ctags are token-based instead of our line-based parsers and are definitely superior and all development should go towards these parsers.
The sh parser is not token based but the uctags version seems to handle more things.
Other 2 parsers which I think we should eventually adopt are VHDL and tex parsers (both are token-based) - they generate a slightly different set of tags and tag mappings should be adopted to those for the sidebar so I skipped them for now.
Finally, I tried also switching to uctags
c.c
for java, D and C# but our c.c seems to be actually better there.