#include #include #include #include "include/grim.h" #include "include/parser.h" int main() { // Option 1: Parse from a file std::ifstream inputFile("./index.html"); if (!inputFile.is_open()) { std::cerr << "Error: Could not open index.html" << std::endl; return 1; } std::unique_ptr document = parseHTML(inputFile); inputFile.close(); // Close the file after parsing // // // Option 2: Parse from a string (for testing) // // std::string html_content = "
Hello world!

Another paragraph.

"; // // std::stringstream ss(html_content); // // std::unique_ptr document = parseHTML(ss); // // Print the parsed document tree if (document) { document->print(); } else { std::cout << "Document parsing failed or resulted in an empty document." << std::endl; } // std::ifstream inputFile("./style.css"); // // // parseCSS(inputFile); // // inputFile.close(); return 0; }