summaryrefslogtreecommitdiffstats
path: root/src/Statement.php
diff options
context:
space:
mode:
Diffstat (limited to 'src/Statement.php')
-rw-r--r--src/Statement.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/Statement.php b/src/Statement.php
index a813fff..74b2cc3 100644
--- a/src/Statement.php
+++ b/src/Statement.php
@@ -59,6 +59,8 @@ abstract class Statement
*/
public function parse(Parser $parser, TokensList $list)
{
+ $this->first = $list->idx;
+
/**
* Whether options were parsed or not.
* For statements that do not have any options this is set to `true` by
@@ -134,7 +136,7 @@ abstract class Statement
$this->after($parser, $list, $token);
}
- $this->last = --$list->idx; // Go back to last used token.
+ $this->last = $list->idx--; // Go back to last used token.
}
/**