Changed CodeDoc/Parser.phpCodeDoc/Parser/Comment.phpCodeDoc/Parser/Method.phpCodeDoc...
[PHP_CodeDoc] / CodeDoc / Parser.php
index 1a01a1c..098aa9c 100644 (file)
@@ -257,18 +257,19 @@ class PHP_CodeDoc_Parser {
               //  $this->debug(__METHOD__, "{$this->pos}:" .token_name($v[0]) . ":". $v[1]);
                 switch ($v[0]) {
                     case T_CLASS:
-                        PHP_CodeDoc_Parser_Class::read();
+                        PHP_CodeDoc_Parser_Class::read($this);
                         $class_found=1;
                         $inclass =1;
                         break;
                     case T_FUNCTION:
-                        PHP_CodeDoc_Parser_Method::read($inclass);
+                        PHP_CodeDoc_Parser_Method::read($this, $inclass);
                         break;
+                    case T_CONST:
                     case T_VAR:
-                        PHP_CodeDoc_Parser_Var::read($inclass);
+                        PHP_CodeDoc_Parser_Var::read($this, $inclass);
                         break;
                     case T_STRING:
-                        PHP_CodeDoc_Parser_Define::read($v[1]);
+                        PHP_CodeDoc_Parser_Define::read($this, $v[1]);
                         break;
                     case T_DOC_COMMENT:
                     case T_COMMENT:
@@ -383,10 +384,11 @@ class PHP_CodeDoc_Parser {
     }
     
     /**
+     * look for items... its' really used to look backwards for public/static etc...
      * @returns  false|STRING|constant
      */
     
-    function look_nws($num, $stop= '')
+    function look_nws($num)
     {
         $dir = $num > 0 ? 1 : -1;
         if (!$num) {
@@ -403,7 +405,7 @@ class PHP_CodeDoc_Parser {
                 $p += $dir;
                 continue;
             }
-            if ($stop != '' && $t == $stop) {
+            if (is_string($t)) { // stop on puncutation...
                 return false;
             }
             $c++;