KDev-PG-Qt and unions
    Jonathan Schmidt-Dominé - Developer 
    devel at the-user.org
       
    Sat Apr 24 18:05:49 UTC 2010
    
    
  
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.
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...
Jonathan
    
    
More information about the KDevelop-devel
mailing list