Re: [anjuta-devel] How to get the type of member that is a pointer using symbol-db
- From: Massimo Cora' <maxcvs email it>
- To: Sébastien Granjoux <seb sfo free fr>
- Cc: anjuta-devel-list <anjuta-devel-list gnome org>
- Subject: Re: [anjuta-devel] How to get the type of member that is a pointer using symbol-db
- Date: Wed, 31 Jul 2013 00:53:53 +0200
On 07/30/2013 09:07 PM, Sébastien Granjoux wrote:
Hi Massimo,
Le 28/07/2013 18:54, Massimo Cora' a écrit :
I remember that I wrote a patch against ctags to get the return type of
a function, and that I implemented a way to get the pointer type of a
variable in the cxx-parser, using some code from CodeLite - and a lexer.
You can look at parser-cxx plugin.
Anyway please note that currently symbol-db won't give you the pointer
info because its ctags-backend doesn't provide it.
The best choice would be to replace totally ctags in view of a clang
based parser.
I'm interested to improve this part.
Yeah I had also to help you doing this but unfortunately I'm flooded
with other inputs at the moment, sorry.
I have thought about moving the
code reading the output of ctags in its own plugin allowing to easily
use a different backend. It will make the code of the symbol-db smaller
and it will be easier to choose a different backend. But I'm not sure it
worths it. Else as we use anjuta-ctags anyway, we can just improve
anjuta-ctags. What do you think?
This is a delicate part.
IMHO I would suggest to drop ctags at all. It's too weak to have some
serious symbol parsing. Secondly, it appears to be a dead project for a
long time now - so no help from its devs.
I would point all on clang, but there are a couple of things to verify
before analysing a porting:
1. Does it support static symbol listing in a ctags fashion? If yes
we'll be safe.
2. The point 1 can be done fast? So fast that we can consider it nearly
real-time? Ok, if yes we could drop the db thing, at least for
small-medium projects. For the big ones there can be some scalability
problems and we have to think about some cache system for the scan - but
maybe clang has it already?
3. The completion. I'm sure I've seen a clang api that list the
suggestions given a text-file and a column-row parameters - we could
trash cxx-parser and swap it with the clang beast.
4. Other languages than C/C++. Well, is it worth keeping the old
fashioned ctags to have a really tiny support for some symbols here and
there in the source files? IMHO we have to take a decision here. We
should have some numbers on how many people uses Anjuta and for what
languages. Python and Javascript for instance have their compilers
installed into Anjuta. Why don't we let them provide the symbols given a
common-interface?
Regards,
Massimo
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]