blob: a4939d3861368f754c51d886ffc5740216e0387e [file] [log] [blame]
swissChili923bd532021-12-08 22:48:58 -08001#pragma once
2
3#include <QString>
4#include <QList>
5
6#include "Evaluator.h"
7#include "AstNode.h"
8
9class Repl
10{
11public:
12 Repl();
13
14 void start();
15 char *prompt();
16
17protected:
18 QString readLine();
19 bool trySpecialCase(QString line);
20 bool tryEvaluate(QString line, QList<AstNode> *expr);
21
22 Evaluator _eval;
23
24 bool _running = true;
25};