Skip to content

Commit

Permalink
text is needed over value
Browse files Browse the repository at this point in the history
  • Loading branch information
robertleeplummerjr committed Jul 29, 2013
1 parent 34c4a71 commit 83ab6e6
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions ports/php/template.php
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ function parse($input)
//TODO: add ranges
}

$r = $this->parserPerformAction($_yy->value, $yy, $action->state->index, $vstack, $vstackCount - 1);
$r = $this->parserPerformAction($_yy->text, $yy, $action->state->index, $vstack, $vstackCount - 1);

if (isset($r)) {
return $r;
Expand Down Expand Up @@ -236,7 +236,7 @@ function setInput($input)
function input()
{
$ch = $this->input[0];
$this->yy->value .= $ch;
$this->yy->text .= $ch;
$this->yy->leng++;
$this->offset++;
$this->match .= $ch;
Expand All @@ -263,7 +263,7 @@ function unput($ch)
$linesCount = count($lines);

$this->input = $ch . $this->input;
$this->yy->value = substr($this->yy->value, 0, $len - 1);
$this->yy->text = substr($this->yy->text, 0, $len - 1);
//$this->yylen -= $len;
$this->offset -= $len;
$oldLines = explode("/(?:\r\n?|\n)/", $this->match);
Expand Down Expand Up @@ -333,7 +333,7 @@ function next()
}

if ($this->more == false) {
$this->yy->value = '';
$this->yy->text = '';
$this->match = '';
}

Expand Down Expand Up @@ -365,12 +365,12 @@ function next()
);


$this->yy->value .= $match[0];
$this->yy->text .= $match[0];
$this->match .= $match[0];
$this->matches = $match;
$this->matched .= $match[0];

$this->yy->leng = strlen($this->yy->value);
$this->yy->leng = strlen($this->yy->text);
if (isset($this->ranges)) {
$this->yy->loc->range = new ParserRange($this->offset, $this->offset += $this->yy->leng);
}
Expand Down

0 comments on commit 83ab6e6

Please sign in to comment.