[Qt-creator] Symbol visitor and Scope::Use questions

Roberto Raggi roberto.raggi at trolltech.com
Tue Mar 24 11:42:24 CET 2009


Hi Bertjan,

On 23.03.2009, at 16:06, Bertjan Broeksema wrote:
>
> However, if we use this code for this small example:
>
> int main(int argc, char *argv[])
> {
>  string s = "een string";
>  s += " meer tekst";
>  cout << s << endl;
>
>  return 0;
> }
>
> it seems that there is only a child node for the declaration of s in  
> the
> block. The semantic pass doesn't seem to add child nodes to the  
> block for the
> Expressions which are in the block. Could you explain why this  
> happens and how
> we eventually could solve this?

Right, there's only one declaration in the block, so it kind of make  
sense to me that there is only one symbol in `block->members()' (the  
symbol introduced by the declaration of `s').

>
> Another question we had is about the Use class in Scope. What  
> exactly is the
> purpose of this class? Does it define the relation definition <-> use?

Well - that code is not used at the moment. I'm still playing with  
different ways to represent a `use' of Symbol. By the way, when it'll  
be done you'll be able to ask the engine for all the uses of a symbol  
introduced by a declaration.

ciao robe

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-creator-old/attachments/20090324/c9cbfb8e/attachment.html 


More information about the Qt-creator-old mailing list