From 2b575d4f0ec89ca8b4d6d1d0fd297ba9d92b837b Mon Sep 17 00:00:00 2001 From: Sven Slootweg Date: Sat, 12 May 2012 00:06:21 +0200 Subject: [PATCH] Clean up some unneeded parser code --- class.templater.php | 18 +++--------------- 1 file changed, 3 insertions(+), 15 deletions(-) diff --git a/class.templater.php b/class.templater.php index d36e590..be42dd6 100644 --- a/class.templater.php +++ b/class.templater.php @@ -409,8 +409,6 @@ class Templater echo("[{$depth}]" . str_repeat("   ", $depth) . "/{$identifier}
"); echo("[{$depth}]" . str_repeat("   ", $depth) . " {$current_tag[$depth]}
"); - $current_element[$depth]->content_end = $tag_start; - $current_element[$depth]->FetchContents($content); } else { @@ -452,7 +450,7 @@ class Templater pretty_dump($current_element[0]); } - function CreateSyntaxElement($identifier, $statement, $content_start) + function CreateSyntaxElement($identifier, $statement) { if($identifier == "if") { @@ -484,7 +482,6 @@ class Templater $element->right = $statement_parts[2]; } - $element->content_start = $content_start; return $element; } } @@ -492,16 +489,7 @@ class Templater class TemplateSyntaxElement { public $parent = null; - public $statement = ""; - public $contents = ""; public $children = array(); - public $content_start = 0; - public $content_end = 0; - - public function FetchContents($original) - { - //$this->contents = substr($original, $this->content_start, $this->content_end); - } } class TemplateRootElement extends TemplateSyntaxElement {} @@ -513,15 +501,15 @@ class TemplateTextElement extends TemplateSyntaxElement class TemplateIfElement extends TemplateSyntaxElement { + public $statement = ""; public $left = ""; public $right = ""; public $operator = ""; - public $if_block = ""; - public $else_block = ""; } class TemplateForEachElement extends TemplateSyntaxElement { + public $statement = ""; public $source = ""; public $varname = ""; public $block = "";