protected function parseClass(ClassBuilder $builder, NodeStream $stream)
    {
        $node = $stream->expect(TokenParser::NODE_CLASS);
        $docblock = array();
        $builder->setClass($node->getValue());
        if ($stream->is(TokenParser::NODE_EXTENDS)) {
            $builder->setExtends($stream->current()->getValue());
            $stream->next();
        }
        while ($stream->is(TokenParser::NODE_IMPLEMENTS)) {
            $builder->addInterface($stream->current()->getValue());
            $stream->next();
        }
        while ($stream->is(TokenParser::NODE_CLASS_COMMENT)) {
            $docblock[] = $stream->current()->getValue();
            $stream->next();
        }

        if (count($docblock) > 0) {
            $builder->setDocblock($docblock);
        }

        $this->status = self::STAT_BODY;
    }