Doc comment patch
| From: | Andrei Zmievski | Date: | Thu, 13 Mar 2003 20:51:23 +0000 |
| Subject: | Doc comment patch | ||
| Groups: | php.internals | ||
| Request: | Send a blank email to internals+get-31@lists.php.net to get a copy of this message | ||
Pursuant to the introspection portion of TODO-PHP5, here is a small
patch that:
- Keeps track of starting/ending line numbers for user functions.
- Removes extraneous T_ML_COMMENT token.
- Stores the last seen doc comment (JavaDoc style) in the compiler
globals for future access by the introspection features and introduces
the new T_DOC_COMMENT token. The doc comment is defined as a multiline
comment starting with "/** \n" and ending with "*/". So, in the
following example:
/**
* @name foo
* @param blah string
*/
function foo($blah)
{
}
The CG(doc_comment) will contain:
* @name foo
* @param blah string
What is left to do here is adding the T_DOC_COMMENT to parser rules and
storing it in the appropriate structures (zend_op_array for functions,
zend_class_entry for classes, etc).
If no one objects, I will commit it shortly.
-Andrei http://www.gravitonic.com/
The Feynman problem solving algorithm:
1) Write down the problem.
2) Think real hard.
3) Write down the answer.