User forums > Using Code::Blocks

About "Find declaration of" and "Find implementation of"

<< < (2/2)

ollydbg:
Ok, because n is a local variable, so, the parser in CodeCompletion didn't record it in the TokenTree.

killerbot:
can we make it work ?

ollydbg:

--- Quote from: killerbot on February 10, 2010, 07:10:13 am ---can we make it work ?

--- End quote ---

Yes, but that will increase the parsing time, also, we have many many local variables which have the same name....  
Currently, function implementation body was just skipped by the parser.

Anyway, Parsing the function body is just like parsing "class declaration". for example:


--- Code: ---void main(){

int a;
int b;
}

--- End code ---

So, we have "three tokens" here: "main", "a" , "b" (both "a" and "b" have a parent pointer pointing to "main").


Then only time we parse the function body was when we are doing the "autocompletion stage", at this time, we need to collect the "local tokens", but we only parse the function body where our caret locates. Once we move to another function body, the "local tokens" will be regenerated when we do a "autocompletion stage".

New idea:
According to the real time parse theme, why not collect and update the "local tokens" in real-time? if the local tokens were collected already, we don't need to parse the local blocks when doing "autocompletion stage" any more. Using this method, we don't increase the batch parsing time. Really good idea!!!

wuyihao:
I see.Thank you!
But actually,I don't really understand what you mean.

blueshake:
mean that it is not a bug. :D

Navigation

[0] Message Index

[*] Previous page

Go to full version