QMake parser incomplete?

Alexander Dymo dymo at mk.ukrtelecom.ua
Thu Aug 3 07:40:08 UTC 2006


On Thursday 03 August 2006 02:48, Andreas Pakulat wrote:
> I started to work on integrating the QMake parser into the qmake manager
> in kdevelop 3.4 and stumbled across the IncludeAST::writeBack method
> doing nothing. I wonder wether that is correct.
Yes, that's correct so far, because actually include(foo) is parsed as
ProjectAST with FunctionScope kind. And include is written back using
ProjectAST::writeBack just like any other function.

> The reason why I wonder is that the viewer tells me that for an include
> statement like
> include(foobar.pri)
> writeBack will write
> include(foobar.pri) {
That was a bug that I just fixed.

> So  could it be that there's a bug in the QMake parser? The Tree itself
> looks fine, i.e. it is an IncludeAST Node there...
Include AST node there is just a child of ProjectAST to make it easier to
extract the name of included file. IncludeAST itself is neither written back
nor necessary for the parser operation.

You can leave this as is or make IncludeAST inherit the ProjectAST and
have the parser generate it instead of FunctionScope-d ProjectAST.




More information about the KDevelop-devel mailing list