From 37ef764af7961ba481fa13c3d3a1f0f8010cfe42 Mon Sep 17 00:00:00 2001 From: Bob Polis Date: Fri, 19 Aug 2022 08:46:53 +0200 Subject: [PATCH] Changed to compiler --- src/main.cpp | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index b86330c..70b939e 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -1,11 +1,3 @@ -// -// main.cpp -// curly -// -// Created by Bob Polis at 2020-09-01 -// Copyright (c) 2020 SwiftCoder. All rights reserved. -// - #include #include #include @@ -15,7 +7,7 @@ #include #include #include "requester.hpp" -#include "interpreter.hpp" +#include "compiler.hpp" sc::logger logger {"curly", sc::loglevel::info}; @@ -56,17 +48,15 @@ int main(int argc, char* argv[]) { throw std::runtime_error("unrecognized option"); } } - interpreter proc; + compiler proc; bool done {false}; if (optind == argc) { // here when no file args std::string base_url {"https://www.swiftcoder.nl/cplus/"}; std::string next_url {"start.txt"}; - std::string code; requester req; while (!done) { - code = req.get(base_url + next_url); - std::istringstream in {code}; + std::istringstream in {req.get(base_url + next_url)}; next_url = proc.eval(in, done); SCInfo(logger, next_url); }