Changed to compiler
This commit is contained in:
parent
db255d5cf2
commit
37ef764af7
16
src/main.cpp
16
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 <iostream>
|
||||
#include <cstdlib>
|
||||
#include <string>
|
||||
@ -15,7 +7,7 @@
|
||||
#include <getopt.h>
|
||||
#include <libsclogging.hpp>
|
||||
#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);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user