Changed CodeDoc/Parser.phpCodeDoc/Parser/Comment.phpCodeDoc/Parser/Method.phpCodeDoc...
[PHP_CodeDoc] / CodeDoc / Parser / Comment.php
index 34e394a..8fcd601 100644 (file)
@@ -15,21 +15,21 @@ require_once 'PHP/CodeDoc/Data/Param.php';
 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;
         
@@ -160,7 +160,7 @@ class PHP_CodeDoc_Parser_Comment {
                         $flags['rawdata'] = TRUE;
                         break;
                     default:
-                        $desc->$key = $linedata[2];\r
+                        $desc->$key = $linedata[2];\r\r
                 }
                 continue;
             }
@@ -190,12 +190,12 @@ class PHP_CodeDoc_Parser_Comment {
     } 
     
     
-    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)) {