protected function parseProperty(TokenStream $stream, $visibility, $name)
    {
        switch ($visibility->getValue()) {
            case '+':
                $this->nodes[] = new Node(self::NODE_PUBLIC_PROPERTY, $name->getValue());
                break;
            case '#':
                $this->nodes[] = new Node(self::NODE_PROTECTED_PROPERTY, $name->getValue());
                break;
            case '-':
                $this->nodes[] = new Node(self::NODE_PRIVATE_PROPERTY, $name->getValue());
                break;
        }
        if ($this->skip($stream)->is(Lexer::TOKEN_TYPE)) {
            $stream->next();
            $token = $this->skip($stream)->expect(Lexer::TOKEN_NODE);
            $this->nodes[] = new Node(self::NODE_PROPERTY_TYPE, $token->getValue());
        }

        if ($this->skip($stream)->is(Lexer::TOKEN_BRCO)) {
            $stream->next();
            while (!$this->skip($stream)->is(Lexer::TOKEN_BRCC)) {
                if ($this->skip($stream)->is(array(Lexer::TOKEN_PUBL, Lexer::TOKEN_PROT, Lexer::TOKEN_PRIV))) {
                    throw new \Exception('Unexpected token: ' . $stream->current()->getType());
                }

                $token = $stream->skipType(array(Lexer::TOKEN_EOL, Lexer::TOKEN_WTSP))->expect(Lexer::TOKEN_NODE);
                $this->nodes[] = new Node(self::NODE_ACCESSOR, $token->getValue());
            }
            $stream->next();
        }

        $this->parseComment($stream, self::NODE_PROPERTY_COMMENT);
    }
protected function parseProperty(TokenStream $stream, $visibility, $name)
    {
        switch ($visibility->getValue()) {
            case '+':
                $this->nodes[] = new Node(self::NODE_PUBLIC_PROPERTY, $name->getValue());
                break;
            case '#':
                $this->nodes[] = new Node(self::NODE_PROTECTED_PROPERTY, $name->getValue());
                break;
            case '-':
                $this->nodes[] = new Node(self::NODE_PRIVATE_PROPERTY, $name->getValue());
                break;
        }
        if ($this->skip($stream)->is(Lexer::TOKEN_TYPE)) {
            $stream->next();
            $token = $this->skip($stream)->expect(Lexer::TOKEN_NODE);
            $this->nodes[] = new Node(self::NODE_PROPERTY_TYPE, $token->getValue());
        }

        if ($this->skip($stream)->is(Lexer::TOKEN_BRCO)) {
            $stream->next();
            while (!$this->skip($stream)->is(Lexer::TOKEN_BRCC)) {
                if ($this->skip($stream)->is(array(Lexer::TOKEN_PUBL, Lexer::TOKEN_PROT, Lexer::TOKEN_PRIV))) {
                    throw new \Exception('Unexpected token: ' . $stream->current()->getType());
                }

                $token = $stream->skipType(array(Lexer::TOKEN_EOL, Lexer::TOKEN_WTSP))->expect(Lexer::TOKEN_NODE);
                $this->nodes[] = new Node(self::NODE_ACCESSOR, $token->getValue());
            }
            $stream->next();
        }

        $this->parseComment($stream, self::NODE_PROPERTY_COMMENT);
    }
protected function parseProperty ( TokenStream $ stream , $ visibility , $ name ) { switch ( $ visibility -> getValue ( ) ) { case '+' : $ this -> nodes [ ] = new Node ( self :: NODE_PUBLIC_PROPERTY , $ name -> getValue ( ) ) ; break ; case '#' : $ this -> nodes [ ] = new Node ( self :: NODE_PROTECTED_PROPERTY , $ name -> getValue ( ) ) ; break ; case '-' : $ this -> nodes [ ] = new Node ( self :: NODE_PRIVATE_PROPERTY , $ name -> getValue ( ) ) ; break ; } if ( $ this -> skip ( $ stream ) -> is ( Lexer :: TOKEN_TYPE ) ) { $ stream -> next ( ) ; $ token = $ this -> skip ( $ stream ) -> expect ( Lexer :: TOKEN_NODE ) ; $ this -> nodes [ ] = new Node ( self :: NODE_PROPERTY_TYPE , $ token -> getValue ( ) ) ; } if ( $ this -> skip ( $ stream ) -> is ( Lexer :: TOKEN_BRCO ) ) { $ stream -> next ( ) ; while ( ! $ this -> skip ( $ stream ) -> is ( Lexer :: TOKEN_BRCC ) ) { if ( $ this -> skip ( $ stream ) -> is ( array ( Lexer :: TOKEN_PUBL , Lexer :: TOKEN_PROT , Lexer :: TOKEN_PRIV ) ) ) { throw new \ Exception ( 'Unexpected token: ' . $ stream -> current ( ) -> getType ( ) ) ; } $ token = $ stream -> skipType ( array ( Lexer :: TOKEN_EOL , Lexer :: TOKEN_WTSP ) ) -> expect ( Lexer :: TOKEN_NODE ) ; $ this -> nodes [ ] = new Node ( self :: NODE_ACCESSOR , $ token -> getValue ( ) ) ; } $ stream -> next ( ) ; } $ this -> parseComment ( $ stream , self :: NODE_PROPERTY_COMMENT ) ; }
Parses property tokens

@param TokenStream $stream     TokenStream object
@param Token       $visibility Token <TOKEN_PUBL> or <TOKEN_PROT> or <TOKEN_PRIV>
@param Token       $name       Token <TOKEN_NODE>

@throws \Exception
Parses property tokens