Hmm. I thought introspection is reflection. It seems I misunderstood.
Are you sure it's worth bloating the engine to hold this extra information?

Andi

At 03:51 PM 3/13/2003 -0500, Andrei Zmievski wrote:
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.

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php


--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php



Reply via email to