#pragma once

#include "Uri.hh"
#include "parser.h"
#include <optional>
#include <vector>

class Document
{
public:
    Uri uri;
    std::vector<gem_line> lines;

private:
    char *buf;

    Document(Uri, char *, std::vector<gem_line>);

public:
    static std::optional<Document> parse(Uri uri, const char *buf);
    static std::optional<Document> parse(const char *uri, const char *buf);
};