Parse docblocks

Niko Sams niko.sams at gmail.com
Mon Jul 7 20:54:06 UTC 2008


I want to parse docblocks in php code, as they might contain
useful information the code itself doesn't provide (php is a dynamic language).

But where could I implement this? The Lexer allready produces the
correct token-kinds,
but they are not filled into the TokenStream. Doing so (as Tokens) is
not really possible as
the parser can't deal with them.

So my idea: Create a custom TokenStream with a custom Token-class and for every
Token store the docBlockStart and docBlockEnd position.
But this means I have to implement TokenStream myselfe.

Any better ideas?

Niko




More information about the KDevelop-devel mailing list