removed the T_DOC_COMMENT from being ignored by zendlex -
looks like at the moment, optional_doc_comment is splattered all over the parser.
the other way to do this (is what phpcodedoc does) is just to remembering the last comment block (pointer to startpos, and length within the compiled string.) - leave the parser ignoring T_DOC_COMMENT tags.
- reset the startpos to -1 it at the end of each statement. (comments in the wrong place are just ignored)
then copying it when you declare classes/vars etc. directly from startpos/length.. (and reset the startpos).
putting in the parser is just a bit too messy.. IMO :)
Regards Alan
This problem bites just about any places where people used /** */ as comments.
For example:
if ($a > 5) { /** This is a smart check *.
}
IMO, we can't break BC this badly.
Ah, that's right. We probably need to rethink our strategy then, and tie doc comments to the relevant tokens that follow them. Not a very easy task I think.
Zeev
--
Can you help out? Need Consulting Services or Know of a Job?
http://www.akbkhome.com
-- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php