#pragma once #include #include #include #include namespace blankie { namespace html { struct Element; struct HTMLString { HTMLString() = default; explicit HTMLString(std::string str_) : str(std::move(str_)) {} std::string str; }; typedef std::pair Attribute; typedef std::variant Node; struct Element { const char* tag; std::vector attributes; std::vector nodes; Element(const char* tag_) : tag(tag_) {} Element(const char* tag_, std::vector nodes_) : tag(tag_), nodes(std::move(nodes_)) {} Element(const char* tag_, std::vector attributes_, std::vector nodes_) : tag(tag_), attributes(std::move(attributes_)), nodes(std::move(nodes_)) {} std::string serialize() const; }; } // namespace html } // namespace blankie