[Qt-creator] Multiple Symbols in Scope for same Namespace

Marek Jasovsky jasovsky.marek at gmail.com
Thu Mar 12 12:03:16 CET 2009


Hi

Thanks a lot for your answer.

this means that same mechanism can be used to identify e.g. local variable
declaration in ast (which has a symbol assigned to it) and if I use this
variable, same symbol should be attached to the ast node at the place of
usage of this variable?


2009/3/12 Roberto Raggi <roberto.raggi at trolltech.com>

>
> On 12.03.2009, at 10:21, Marek Jasovsky wrote:
>
> class MyVisitor: protected ASTVisitor {
>  // ...
>
> protected:
>    virtual bool visit(FunctionDefinitionAST *ast) {
>       Function *fun = ast->symbol->asFunction();
>       qDebug() << "scope:" << fun->scope() << "name = " << fun->name();
>       qDebug() << "coordinates:" << fun->line() << fun->column();
>       return false;
>    }
> };
>

this means that same mechanism can be used to identify e.g. local variable
declaration in ast (which has a symbol assigned to it) and if I use this
variable, same symbol should be attached to the ast node at the place of
usage of this variable? (I remember you talking about implementing similar
stuff)

Thanks

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


More information about the Qt-creator-old mailing list