From 074b5589ad6d4c56355db9209f0c6e29d2b4e1ef Mon Sep 17 00:00:00 2001 From: fgendreau Date: Sat, 8 Feb 2014 21:43:39 -0500 Subject: Update CCPP.class.php Problem with inlined comments '//' which don't get suppressed. (line 381) Added support for T_DOC_COMMENT since they were not suppressed either. (line 380) Removed a single new-line character at the end of T_OPEN_TAG. (line 324) --- CCPP.class.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'CCPP.class.php') diff --git a/CCPP.class.php b/CCPP.class.php index 1532449..d57533b 100644 --- a/CCPP.class.php +++ b/CCPP.class.php @@ -321,7 +321,7 @@ class CCPP if (is_string($value)) //Operator $code .= $value; elseif ($value[0] == T_OPEN_TAG) // options['translate.compactWhitespaces']) //Replaces whitespaces with single space character $code .= ' '; elseif ($value[0] == T_STRING) { @@ -377,6 +377,8 @@ class CCPP $code .= $sPOT.'$this->_processor_warning('.$this->_protector_singleQuoted($op).', '.$value[2].');'.$sPCT."\n"; } // END Directives + elseif ($value[0] == T_DOC_COMMENT); //skip /** */ PHPDoc comments. + elseif ($value[1][0] == '/' && $value[1][1] == '/'); // skip inlined '//' comments (not recognized as T_COMMENT as of zend 2.4) else $code .= strtr($value[1], $protectPOT); //Unrecognized token is appended as is } return $code; // Return compiled code @@ -551,4 +553,4 @@ class CCPP { return '\''.$this->_protector_escapeSingleQuote($string).'\''; } -} \ No newline at end of file +} -- cgit v1.2.3