public function getToken($index) : Token
    {
        if (!isset($this->tokens[$index])) {
            throw new Error\NoTokenAtIndex($index);
        }

        return $this->tokens[$index];
    }
public function getToken($index) : Token
    {
        if (!isset($this->tokens[$index])) {
            throw new Error\NoTokenAtIndex($index);
        }

        return $this->tokens[$index];
    }
public function getToken ( $ index ) : Token { if ( ! isset ( $ this -> tokens [ $ index ] ) ) { throw new Error \ NoTokenAtIndex ( $ index ) ; } return $ this -> tokens [ $ index ] ; }
Gets a token at given index

@param $index
@return Token
@throws NoTokenAtIndex
Gets a token at given index