Re: [anjuta-devel] How to get the type of member that is a pointer using symbol-db
- From: Marco Diego Aurélio Mesquita <marcodiegomesquita gmail com>
- To: "Massimo Cora'" <maxcvs email it>
- 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: Mon, 29 Jul 2013 08:08:56 -0300
On Sun, Jul 28, 2013 at 1:54 PM, Massimo Cora' <maxcvs email it> wrote:
The best choice would be to replace totally ctags in view of a clang based
parser.
That would be a too much work for the feature I want to implement. For
now, I'm thinking on a workaround. Suppose that I want to get type of
"help_window" that is declared as:
GtkWindow *main_window, *help_window;
Currently, it is easy to correctly get the offsets of GtkWindow and
help_window. So, now we'll store the piece of the string between
GtkWindow and help_window in a buffer. Such buffer would then contain:
" *main_window, *". To get the correct type, we'll scan this buffer
backwards and stop scanning once we find a "," or we reach the
beginning of the buffer and store each non-commented char in another
buffer. This other buffer would then contain: " *". This other buffer
can then be concatenated with the first buffer to correctly get the
type of "help_window": "GtkWidget *".
Do you think this approach is acceptable?
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]