From 602fb22ddad8ac2462f60afb174f975a83e2d822 Mon Sep 17 00:00:00 2001 From: Jens Frank Date: Sun, 29 Feb 2004 11:00:30 +0000 Subject: [PATCH] renamed variables for better readability --- includes/Tokenizer.php | 27 ++++++++++++++++----------- 1 file changed, 16 insertions(+), 11 deletions(-) diff --git a/includes/Tokenizer.php b/includes/Tokenizer.php index 4e8cf560e8..f0e9b08a3b 100644 --- a/includes/Tokenizer.php +++ b/includes/Tokenizer.php @@ -1,7 +1,12 @@ mCount = preg_match_all( "/(\[\[|\]\]|\'\'\'\'\'|\'\'\'|\'\')/", - $this->mText, $this->mM, + $this->mText, $this->mMatch, PREG_PATTERN_ORDER|PREG_OFFSET_CAPTURE); - $this->mMPos=0; + $this->mMatchPos=0; } function nextToken() @@ -33,7 +38,7 @@ class Tokenizer { if ( $token["type"] == "text" ) { $this->mPos = $token["mPos"]; } else { - $this->mMPos = $token["mMPos"]; + $this->mMatchPos = $token["mMatchPos"]; $this->mPos = $token["mPos"]; } } @@ -43,17 +48,17 @@ class Tokenizer { function previewToken() { - if ( $this->mMPos <= $this->mCount ) { + if ( $this->mMatchPos <= $this->mCount ) { $token["pos"] = $this->mPos; - if ( $this->mPos < $this->mM[0][$this->mMPos][1] ) { + if ( $this->mPos < $this->mMatch[0][$this->mMatchPos][1] ) { $token["type"] = "text"; $token["text"] = substr( $this->mText, $this->mPos, - $this->mM[0][$this->mMPos][1] - $this->mPos ); - $token["mPos"] = $this->mM[0][$this->mMPos][1]; + $this->mMatch[0][$this->mMatchPos][1] - $this->mPos ); + $token["mPos"] = $this->mMatch[0][$this->mMatchPos][1]; } else { - $token["type"] = $this->mM[0][$this->mMPos][0]; + $token["type"] = $this->mMatch[0][$this->mMatchPos][0]; $token["mPos"] = $this->mPos + strlen($token["type"]); - $token["mMPos"] = $this->mMPos + 1; + $token["mMatchPos"] = $this->mMatchPos + 1; } } elseif ( $this->mPos < $this->mTextLength ) { $token["type"] = "text"; -- 2.20.1