public function getLastTokenPosition()
    {
        $endNamespaceTokenPosition = $this->namespaceNode->getAttribute('endTokenPos');

        /** @var Node $lastNamespaceNode */
        $lastNamespaceNode         = end($this->namespaceNode->stmts);
        $endStatementTokenPosition = $lastNamespaceNode->getAttribute('endTokenPos');

        return max($endNamespaceTokenPosition, $endStatementTokenPosition);
    }