Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 0.1.15

Request #15061 Exclamation should be treated as operator
Submitted: 2008-11-17 17:25 UTC
From: fidian Assigned: clbustos
Status: Closed Package: PHP_Beautifier (version 0.1.14)
PHP Version: 5.2.4 OS: Linux (various)
Roadmaps: (Not assigned)    
Subscription  
Comments Add Comment Add patch


Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know! Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem : 38 - 37 = ?

 
 [2008-11-17 17:25 UTC] fidian (Tyler Akins)
Description: ------------ The exclamation point is not caught by T_OPERATOR as expected. It would be easy to add the following line to Beautifier.php at about line 300: '!' => 'T_OPERATOR', That way parsed code that looks like (!$varname) could be beautified into (! $varname) by adding rules to just operators. Right now, one would have to add code to add whitespace before variables, functions, and other things.

Comments

 [2008-11-17 19:01 UTC] fidian (Tyler Akins)
I figure that it doesn't need to be an operator, just as long as I can specify actions based on an exclamation point.
 [2010-06-01 01:03 UTC] clbustos (Claudio Bustos)
-Status: Open +Status: Closed -Assigned To: +Assigned To: clbustos
Token added as T_OPERATOR_NEGATION ON Github.