class PHP_CodeDoc_Parser_Comment {
- function parse() { // static method !!!! returns a Phpdoc data object
- if ($r = PHP_CodeDoc_Parser_Comment::phpDocParse()) {
+ function parse(PHP_CodeDoc_Parser $thiz) { // static method !!!! returns a Phpdoc data object
+ if ($r = PHP_CodeDoc_Parser_Comment::phpDocParse($thiz)) {
return $r;
}
- return PHP_CodeDoc_Parser_Comment::shortDocParse();
+ return PHP_CodeDoc_Parser_Comment::shortDocParse($thiz);
}
- function phpDocParse() { // parse normal phpdoc comments
+ static function phpDocParse(PHP_CodeDoc_Parser $thiz) { // parse normal phpdoc comments
$desc = new PHP_CodeDoc_Data_PhpDoc;
- if (!$this->last_comment_block)
+ if (!$thiz->last_comment_block)
return;
// clear last comment
- $comment = $this->last_comment_block;
- $this->last_comment_block = "";
+ $comment = $thiz->last_comment_block;
+ $thiz->last_comment_block = "";
if (substr(trim($comment),0,2) != "/*")
return;
$flags['rawdata'] = TRUE;
break;
default:
- $desc->$key = $linedata[2];\r
+ $desc->$key = $linedata[2];\r\r
}
continue;
}
}
- function shortDocParse() { // parse short comments
+ function shortDocParse(PHP_CodeDoc_Parser $thiz) { // parse short comments
$desc = new PHP_CodeDoc_Data_PhpDoc;
- $pos = $this->pos+1;
+ $pos = $thiz->pos+1;
//echo "LOOKING FOR SHORT";
- while($pos < $this->total) {
- $v = $this->tokens[$pos];
+ while($pos < $thiz->total) {
+ $v = $thiz->tokens[$pos];
if (is_array($v)) {