コード例 #1
0
ファイル: DoubleString.php プロジェクト: elmosgot/code-parser
 public function __construct($code, $vector)
 {
     parent::__construct($code, $vector, 'String');
     $this->pattern = array(new Regex('[^\\\\]"', 2), new Regex('[^\\\\]"', 2));
     $this->lookBehind = true;
     $this->parsable = false;
 }
コード例 #2
0
ファイル: CommentLine.php プロジェクト: elmosgot/code-parser
 public function __construct($code, $vector)
 {
     parent::__construct($code, $vector, 'CommentLine');
     $this->parsable = false;
     $this->pattern = array('//', new Regex('(\\r\\n|\\n|\\r)', 1));
 }
コード例 #3
0
ファイル: Definition.php プロジェクト: elmosgot/code-parser
 public function __construct($code, $vector)
 {
     parent::__construct($code, $vector, 'Definition');
     $this->parsable = false;
     $this->pattern = array(array(new Regex('public([^\\$]{1,})?\\$', 8), new Regex('protected([^\\$]{1,})?\\$', 11), new Regex('private([^\\$]{1,})?\\$', 9)), ';');
 }
コード例 #4
0
ファイル: Block.php プロジェクト: elmosgot/code-parser
 public function __construct($code, $vector)
 {
     parent::__construct($code, $vector, 'Block');
     $this->pattern = array('{', '}');
 }
コード例 #5
0
ファイル: CommentBlock.php プロジェクト: elmosgot/code-parser
 public function __construct($code, $vector)
 {
     parent::__construct($code, $vector, 'CommentBlock');
     $this->parsable = false;
     $this->pattern = array('/*', '*/');
 }
コード例 #6
0
ファイル: ArrayObj.php プロジェクト: elmosgot/code-parser
 public function __construct($code, $vector, $name = 'Array')
 {
     parent::__construct($code, $vector, $name);
     $this->pattern = array('=>', array('),', ';'));
     $this->lookBehind = true;
 }
コード例 #7
0
ファイル: Variable.php プロジェクト: elmosgot/code-parser
 public function __construct($code, $vector, $name = 'Variable')
 {
     parent::__construct($code, $vector, $name);
     $this->pattern = array(array('return', new Regex('[^=\\!\\<\\>]=[^=\\>]', 3)), ';');
     $this->lookBehind = true;
 }