Php::DeclarationBuilder:different IdentifierAsts

Niko Sams niko.sams at
Sun Jun 22 13:15:02 UTC 2008


Using the abstractbuilder-classes works great so far, I just commited
a first duchain-builder
for php - please review it. I tried to stay as close as possible to
the java builders.

I have a problem now with identifiers in this example code:
class A {}
function foo($b) {}

I allready changed the grammar to include an identifer-rule (that
currently is only a STRING)
to class A works.
However $b is not an identifier, as it is a VARIABLE-token instead of
a STRING-token.
So I can't call openDefinition(node->variableName) in the DeclarationBuilder.

Any ideas how this could be solved?
Should I modify the grammar to have STRING or VARIABLE in the identifier rule?
Or could the abstractbuilder be extended to support different identifierAsts?


More information about the KDevelop-devel mailing list