[Qt-creator] ASTVisitor callback
Marek Jasovsky
jasovsky.marek at gmail.com
Thu Jan 8 09:17:02 CET 2009
Hi, does it mean, that my solution would also work, but so far does not fit
your plan, what will be done with the code later, so it's better for me to
wait, than to do it on my own?
thanks
Marek
2009/1/8 Roberto Raggi <roberto.raggi at trolltech.com>
>
> 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
>
> _______________________________________________
> Qt-creator mailing list
> Qt-creator at trolltech.com
> http://lists.trolltech.com/mailman/listinfo/qt-creator
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-creator-old/attachments/20090108/329621f6/attachment.html
More information about the Qt-creator-old
mailing list