Match pointer before buffering the token

This commit is contained in:
Andrea Marco Sartori 2022-12-21 19:29:54 +10:00
parent e2a28ba93d
commit e1450733d1

@ -145,12 +145,12 @@ class State
$treeChanged = true; $treeChanged = true;
} }
$this->bufferToken($token);
if ($treeChanged && $this->pointers->count() > 1) { if ($treeChanged && $this->pointers->count() > 1) {
$this->pointer = $this->pointers->matchTree($this->tree); $this->pointer = $this->pointers->matchTree($this->tree);
} }
$this->bufferToken($token);
$token->mutateState($this); $token->mutateState($this);
} }