public function parse(TokenStream $stream)
    {
        while (!$stream->is(Lexer::TOKEN_EOF)) {
            if ($stream->is(Lexer::TOKEN_WTSP)) {
                $stream->next();
                continue;
            }

            switch ($this->status) {
                case self::STAT_NONE:
                    $this->parseClassDefinition($stream);
                    break;
                case self::STAT_CLASS_DEFINED;
                    $this->parseBody($stream);
                    break;
                default:
                    $stream->next();
                    break;
            }
        }
        $this->nodes[] = new Node(self::NODE_EON, null);

        return new NodeStream($this->nodes);
    }