[PEPr] Comment on PHP::PHP_Beautifier

From: Date: Sun, 16 May 2004 21:48:41 +0000
Subject: [PEPr] Comment on PHP::PHP_Beautifier
Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-29291@lists.php.net to get a copy of this message
Stefan Neufeind (http://pear.php.net/user/neufeind) has commented on the proposal for PHP::PHP_Beautifier. Comment: Generally the class looks good to me. Have you evaluated how PHP-specific the code is - or if it could maybe used as a Sourcecode_Beautifier to also highlight C-code, maybe Python, Pascal or the like. I was it uses token_get_all() from PHP - but maybe another tokeniser could be added? Just wondering if this effort was maybe already done e.g. by Greg or Davey when developing their generic Highlighters. Another thing that I have mixed feelings about are the "filters". I like the approach in general, but I'm not sure it's flexible enough to really fulfill all coding-style-needs that might arise. I had a look at your pear-filter and wonder if it can be flexible enough to even take care of things like "one space after the comma that separates function-parameters" or "no space between functionname and opening parameter-parenthesis" etc. One minor point I was a bit unsure about when looking at the pear-filter: I can also understand that you might consider putting the vim-line as a header into the source. But imho pasting the ready-filled license-header into the source it not a good idea. And what if I simply forgot the vim-headerline but had LGPL in the code etc.? Then another PHP-license-header will be added. But this is just a minor point of discussion. Please excuse me for not having a deeper look yet. But hopefully others will comment different aspects soon as well. As a closing sentence, please let me stress again that I very much appreciate your proposal and would like to see some beautifier like this added to pear. I just wonder if it might be implemented more generic and flexible. Proposal information: http://pear.php.net/pepr/pepr-proposal-show.php?id=74 -- Sent by PEPr, the automatic proposal system at http://pear.php.net

« previous php.pear.dev (#29291) next »