CodeDoc/Parser.php
authorAlan Knowles <alan@roojs.com>
Wed, 26 Oct 2016 03:35:58 +0000 (11:35 +0800)
committerAlan Knowles <alan@roojs.com>
Wed, 26 Oct 2016 03:35:58 +0000 (11:35 +0800)
CodeDoc/Parser.php

index fd21630..1a01a1c 100644 (file)
@@ -386,7 +386,7 @@ class PHP_CodeDoc_Parser {
      * @returns  false|STRING|constant
      */
     
-    function look_nws($num, $stop)
+    function look_nws($num, $stop= '')
     {
         $dir = $num > 0 ? 1 : -1;
         if (!$num) {
@@ -403,6 +403,9 @@ class PHP_CodeDoc_Parser {
                 $p += $dir;
                 continue;
             }
+            if ($stop != '' && $t == $stop) {
+                return false;
+            }
             $c++;
             $p += $dir;
             if ($c >= abs($num)) {