Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:31 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 91929 invoked from network); 13 Mar 2003 20:51:51 -0000 Received: from unknown (HELO hyperion.gravitonic.com) (65.198.110.5) by pb1.pair.com with SMTP; 13 Mar 2003 20:51:51 -0000 Received: (from andrei@localhost) by hyperion.gravitonic.com (8.11.6/8.11.6) id h2DKpN221758 for internals@lists.php.net; Thu, 13 Mar 2003 15:51:23 -0500 X-Authentication-Warning: hyperion.gravitonic.com: andrei set sender to andrei@gravitonic.com using -f Date: Thu, 13 Mar 2003 15:51:23 -0500 To: PHP Internals Message-ID: <20030313205122.GA21734@hyperion.gravitonic.com> Mail-Followup-To: Andrei Zmievski , PHP Internals Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4i Subject: Doc comment patch From: andrei@gravitonic.com (Andrei Zmievski) 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.