KDev-PG-Qt and unions

Milian Wolff mail at milianw.de
Sat Apr 24 17:19:57 UTC 2010


On Saturday 24 April 2010 20:05:49 Jonathan Schmidt-Dominé - Developer wrote:
> Hi Milian!
> 
> A DefaultVisitor would work well without any flags, but have had a look at
> the PHP-plugin, duchain/expressionvisitor.cpp:
> Line 214: if(node->stringFunctionName)
> Line 236: else if(node->varFunctionName)
> php.g, lines 549 and 550:
> stringFunctionName=identifier ... | varFunctionName=variableWithoutObjects
> There would probably be a union { IdentifierAst *stringFunctionName;
> VariableWithoutObjectsAst *varFunctionName; }; the current code in
> expressionvisitor.cpp would not work any longer.

Why? Can you please explain?

> I agree that most stuff in the php-plugin does not need such information,
> but KDev-PG-Qt can not rely on that. In some cases the mentioned
> inline-methods could also be implemented without any additional bits, but
> not always...

I think I can't follow you, why we need any methods. Maybe it's just may 
limited understanding of unions.

-- 
Milian Wolff
mail at milianw.de
http://milianw.de
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20100424/ebd1b63a/attachment.sig>


More information about the KDevelop-devel mailing list