phprs\util\DocParser::Identifier PHP Method

Identifier() private method

Identifier ::= string
private Identifier ( ) : string
return string
    private function Identifier()
    {
        // check if we have an annotation
        if (!$this->lexer->isNextTokenAny(self::$classIdentifiers)) {
            $this->syntaxError('namespace separator or identifier');
        }
        $this->lexer->moveNext();
        $className = $this->lexer->token['value'];
        while ($this->lexer->lookahead['position'] === $this->lexer->token['position'] + strlen($this->lexer->token['value']) && $this->lexer->isNextToken(DocLexer::T_NAMESPACE_SEPARATOR)) {
            $this->match(DocLexer::T_NAMESPACE_SEPARATOR);
            $this->matchAny(self::$classIdentifiers);
            $className .= '\\' . $this->lexer->token['value'];
        }
        return $className;
    }