コード例 #1
0
ファイル: JCssParser.php プロジェクト: chenyongze/m3d
 private static function comment()
 {
     if (self::$css[0] !== '/' || self::$css[1] !== '*') {
         return null;
     }
     $i = 2;
     while (isset(self::$css[$i]) && (self::$css[$i] !== '*' || isset(self::$css[$i + 1]) && self::$css[$i + 1] !== '/')) {
         ++$i;
     }
     $i += 2;
     if (!isset(self::$css[$i - 1])) {
         throw new Exception('End of comment missing');
     }
     $str = substr(self::$css, 2, $i - 2 - 2);
     self::$css = substr(self::$css, $i);
     self::whitespace();
     return array('type' => 'comment', 'comment' => $str);
 }