diff --git a/main.cpp b/main.cpp index 188da8b..9ae0a4a 100644 --- a/main.cpp +++ b/main.cpp @@ -10,9 +10,11 @@ #include #include #include +#include #include #include #include "requester.hpp" +#include "interpreter.hpp" sc::logger logger {"curly", sc::loglevel::info}; @@ -63,10 +65,14 @@ int main(int argc, const char * argv[]) { std::cerr << "curly: " << ex.what() << '\n'; } } - std::cout << "hello, curly\n"; + requester req; - std::cout << req.get("https://www.swiftcoder.nl/") << '\n'; - std::cout << req.get("https://www.swiftcoder.nl/moneydance/") << '\n'; + std::string code {req.get("https://www.swiftcoder.nl/cpp1/start.txt")}; + std::cerr << code << '\n'; + std::istringstream in {code}; + interpreter proc; + std::string result {proc.eval(in)}; + std::cerr << result << '\n'; } catch (const std::exception& ex) { std::cerr << "curly: " << ex.what() << '\n';