protected function getTokenAtIndex(int $index): Token
    {
        if (!$this->hasTokenAtIndex($index)) {
            throw new OutOfRangeException("No token in buffer at given index");
        }
        return $this->tokenList[$index];
    }