[limb-svn] r6400 - 3.x/trunk/limb/macro/src

svn at limb-project.com svn at limb-project.com
Tue Oct 9 14:19:19 MSD 2007


Author: pachanga
Date: 2007-10-09 14:19:18 +0400 (Tue, 09 Oct 2007)
New Revision: 6400
URL: http://fisheye.limb-project.com/changelog/limb/?cs=6400

Modified:
   3.x/trunk/limb/macro/src/lmbMacroTokenizer.class.php
Log:
-- minor internal refactoring

Modified: 3.x/trunk/limb/macro/src/lmbMacroTokenizer.class.php
===================================================================
--- 3.x/trunk/limb/macro/src/lmbMacroTokenizer.class.php	2007-10-09 04:17:56 UTC (rev 6399)
+++ 3.x/trunk/limb/macro/src/lmbMacroTokenizer.class.php	2007-10-09 10:19:18 UTC (rev 6400)
@@ -51,7 +51,7 @@
       $this->position++;
   }
 
-  protected function _findTag($start)
+  protected function _parseUntilTagStart($start)
   {
     do
     {
@@ -64,6 +64,7 @@
         //tag candidate found
         if($tag_start !== false)
         {
+          //add preceding characters
           if($tag_start > $start)
             $this->observer->characters(substr($this->rawtext, $start, $tag_start - $start));
           return $tag_start;
@@ -71,6 +72,7 @@
         //no tags at all
         else
         {
+          //add preceding characters
           if($start != $this->length)
             $this->observer->characters(substr($this->rawtext, $start, $this->length - $start));
           return null;
@@ -86,6 +88,7 @@
           //at the same time tag found and it's not inside php
           if($tag_start !== false && $tag_start < $php_start)
           {
+            //add preceding characters
             if($start < $tag_start)
               $this->observer->characters(substr($this->rawtext, $start, $tag_start - $start));
             return $tag_start;
@@ -127,7 +130,7 @@
     {
       $start = $this->position;
 
-      $this->position = $this->_findTag($start);
+      $this->position = $this->_parseUntilTagStart($start);
       if($this->position === null)
         return;
 



More information about the limb-svn mailing list