[Qt-creator] ASTVisitor callback
Roberto Raggi
roberto.raggi at trolltech.com
Thu Jan 8 09:13:22 CET 2009
Hi,
Yes, we will have something like that, but you need to be a bit more
patient. We are still working on the C++ front-end, and updating all
the visitors after we introduce (or change) an AST node is 1) a lot of
work 2) boring 3) it's pretty easy to introduce regressions. So we
will provide custom AST processors as soon as the API for the C++
front-end is a bit more stable.
ciao robe
On Jan 8, 2009, at 2:30 AM, Marek Jasovsky wrote:
> Hi Roberto
>
> yesterday we discussed custom checkers, that work with the AST, and
> the fact, they MUST be called before translation unit is released.
>
> my first attempt to change this code with 3 more signals, emitted
> from CppPreprocessor::sourceNeeded after calls m_currentDoc->
> setSource, parse, check failed, as signals were intercepted kind of
> asynchronously and in reality well after TU has been released.
>
> you might have a proposal in your head, I just wanted to suggest
> mine and ask, if you could commit this mine, if you liked it.
>
> 1. have abstract class for custom visitors, as interface.
> 2. after getting instance of CppModelManagerInterface
> *m_modelManager from plugin manager I would call
> VisitorInterface *ptr = new MyVisitor()
> m_modelManager->registerASTCallback(ptr)
>
> after calling m_currentDoc->check() code would call
>
> if (visitorInterfaces)
> for each interface
> ptr->processAST(ast);
>
> and this would call my class/method directly.
>
> this is just an idea and I have not implemented it yet locally.
>
> what do you say to this? could you consider commiting this change,
> or better implement it yourself when you have time for this?
>
> Grazie mile
>
> Marek
> _______________________________________________
> Qt-creator mailing list
> Qt-creator at trolltech.com
> http://lists.trolltech.com/mailman/listinfo/qt-creator
More information about the Qt-creator-old
mailing list