protected function parseClassDefinition(TokenStream $stream)
    {
        $token = $stream->expect(Lexer::TOKEN_NODE);
        $this->nodes[] = new Node(self::NODE_CLASS, $token->getValue());
        if ($this->skip($stream)->is(Lexer::TOKEN_EXTD)) {
            $stream->next();
            $token = $stream->skipType(Lexer::TOKEN_WTSP)->expect(Lexer::TOKEN_NODE);
            $this->nodes[] = new Node(self::NODE_EXTENDS, $token->getValue());
        }
        if ($this->skip($stream)->is(Lexer::TOKEN_IMPL)) {
            $stream->next();
            while (!$stream->is(Lexer::TOKEN_EOL)) {
                if ($stream->is(Lexer::TOKEN_NODE)) {
                    $this->nodes[] = new Node(self::NODE_IMPLEMENTS, $stream->current()->getValue());
                }
                $stream->next();
            }
        }
        $this->parseComment($stream, self::NODE_CLASS_COMMENT);
        $this->status = self::STAT_CLASS_DEFINED;
    }
protected function parseClassDefinition(TokenStream $stream)
    {
        $token = $stream->expect(Lexer::TOKEN_NODE);
        $this->nodes[] = new Node(self::NODE_CLASS, $token->getValue());
        if ($this->skip($stream)->is(Lexer::TOKEN_EXTD)) {
            $stream->next();
            $token = $stream->skipType(Lexer::TOKEN_WTSP)->expect(Lexer::TOKEN_NODE);
            $this->nodes[] = new Node(self::NODE_EXTENDS, $token->getValue());
        }
        if ($this->skip($stream)->is(Lexer::TOKEN_IMPL)) {
            $stream->next();
            while (!$stream->is(Lexer::TOKEN_EOL)) {
                if ($stream->is(Lexer::TOKEN_NODE)) {
                    $this->nodes[] = new Node(self::NODE_IMPLEMENTS, $stream->current()->getValue());
                }
                $stream->next();
            }
        }
        $this->parseComment($stream, self::NODE_CLASS_COMMENT);
        $this->status = self::STAT_CLASS_DEFINED;
    }
protected function parseClassDefinition ( TokenStream $ stream ) { $ token = $ stream -> expect ( Lexer :: TOKEN_NODE ) ; $ this -> nodes [ ] = new Node ( self :: NODE_CLASS , $ token -> getValue ( ) ) ; if ( $ this -> skip ( $ stream ) -> is ( Lexer :: TOKEN_EXTD ) ) { $ stream -> next ( ) ; $ token = $ stream -> skipType ( Lexer :: TOKEN_WTSP ) -> expect ( Lexer :: TOKEN_NODE ) ; $ this -> nodes [ ] = new Node ( self :: NODE_EXTENDS , $ token -> getValue ( ) ) ; } if ( $ this -> skip ( $ stream ) -> is ( Lexer :: TOKEN_IMPL ) ) { $ stream -> next ( ) ; while ( ! $ stream -> is ( Lexer :: TOKEN_EOL ) ) { if ( $ stream -> is ( Lexer :: TOKEN_NODE ) ) { $ this -> nodes [ ] = new Node ( self :: NODE_IMPLEMENTS , $ stream -> current ( ) -> getValue ( ) ) ; } $ stream -> next ( ) ; } } $ this -> parseComment ( $ stream , self :: NODE_CLASS_COMMENT ) ; $ this -> status = self :: STAT_CLASS_DEFINED ; }
Parses class tokens

@param TokenStream $stream
Parses class tokens