protected function _next()
{
+
$c = $this->_get();
if ($c !== '/') {
switch ($this->_peek()) {
case '/':
+ $comment = '';
+
while (true) {
$c = $this->_get();
+ $comment .= $c;
if (ord($c) <= self::ORD_LF) {
+ // IE conditional comment
+ if (preg_match('/^\\/@(?:cc_on|if|elif|else|end)\\b/', $comment)) {
+ return '/' . $comment;
+ }
+
return $c;
}
}
case '*':
+ $comment = '';
$this->_get();
while (true) {
- switch($this->_get()) {
+ $get = $this->_get();
+ switch ($get) {
case '*':
if ($this->_peek() === '/') {
$this->_get();
+
+ // IE conditional comment
+ if (preg_match('/^@(?:cc_on|if|elif|else|end)\\b/', $comment)) {
+ return '/*' . $comment . '*/';
+ }
+
return ' ';
}
break;
case null:
throw new Exception('Unterminated comment.');
}
+
+ $comment .= $get;
}
}