Re: [PEPr] +1 for Text::Text_Highlighter
| From: | Greg Beaver | Date: | Tue, 25 May 2004 15:57:41 +0000 |
| Subject: | Re: [PEPr] +1 for Text::Text_Highlighter | ||
| References: | 1 2 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-29653@lists.php.net to get a copy of this message | ||
Andrey Demenev wrote:
Greg, I have re-read your post, and now I think I misunderstood you initially. Do you want highlighter to be used as a plugin for external parser/tokenizer, so that parser does all the job, and the highlighter just outputs the tokens? If so, what is the need to use the highlighter class if almost all of its functionality will be unused? I was thinking about this kind of plugin system: as soon as the highlighter finds a text that must be highlighted, it calls plugin function which can: - return the text unchanged - change color - pre-format the output, so the highlighter would not applyHello from beautiful Rome, Your plugin description is fine, but unless your parser also provides context information, it will be completely useless to phpDocumentor. For instance: token T_STRING is passed in. Is it a constant? Is it a class member? ($this->member, or even $this->member->submember)? Is it a function/class declaration? (function functionname) The highlighting parser *must* have this information available, or there is no way to do cross-referencing (linking from the token to documentation, or to its declaration in the source). Gregits own formatting