PDepend\Source\Language\PHP\PHPParserVersion56::parseUseDeclarations PHP Method

parseUseDeclarations() protected method

Parses use declarations that are valid in the supported php version.
protected parseUseDeclarations ( ) : void
return void
    protected function parseUseDeclarations()
    {
        // Consume use keyword
        $this->consumeToken(Tokens::T_USE);
        $this->consumeComments();
        // Consume const and function tokens
        $nextToken = $this->tokenizer->peek();
        switch ($nextToken) {
            case Tokens::T_CONST:
            case Tokens::T_FUNCTION:
                $this->consumeToken($nextToken);
        }
        // Parse all use declarations
        $this->parseUseDeclaration();
        $this->consumeComments();
        // Consume closing semicolon
        $this->consumeToken(Tokens::T_SEMICOLON);
        // Reset any previous state
        $this->reset();
    }