logo       

Re[1]: array of objects: msg#00000

emacs.semantic

Subject: Re[1]: array of objects

Hi,

You are correct. Fortunately, this is easy to fix up for C code.
I found that the below patch got things working with arrays.

Unfortunately, that is not the real purpose of what the separation
character, so I will resist checking this in while I contemplate a
better way to do this.

If anyone else has a better notion for dealing with the local
context parser, I'd like to read it.

Thanks
Eric

*** semantic-c.el 22 Oct 2005 21:30:47 -0400 1.40
--- semantic-c.el 02 Dec 2005 20:35:25 -0500
***************
*** 571,577 ****
(defvar-mode-local c-mode imenu-create-index-function
'semantic-create-imenu-index
"Imenu index function for C.")

! (defvar-mode-local c-mode semantic-type-relation-separator-character '("."
"->")
"Separator characters between something of a give type, and a field.")

(defvar-mode-local c-mode semantic-command-separation-character ";"
--- 571,578 ----
(defvar-mode-local c-mode imenu-create-index-function
'semantic-create-imenu-index
"Imenu index function for C.")

! (defvar-mode-local c-mode semantic-type-relation-separator-character
! '("\\(\\[\\w+\\]\\)?." "\\(\\[\\w+\\]\\)?->")
"Separator characters between something of a give type, and a field.")

(defvar-mode-local c-mode semantic-command-separation-character ";"


>>> Evgeniy <dushistov@xxxxxxx> seems to think that:
>Hello.
>I try simple code with semantic
>struct A {
> int a;
> int b;
>};
>
>A var;
>var.
>M-x semantic-complete-analyze-inline RET
>and it show list of "a" and "b".
>Great.
>
>But if I write
>
>A var2[2];
>var2[0].
>M-x semantic-complete-analyze-inline RET
>It writes "Inline completetion not needed",
>
>may be I do something wrong?
>How I can get list of "a" and "b"?
>
>PS
>cedet version: 1.0pre3
>GNU Emacs 22.0.50.1
>


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise