blob: b3470f2a5327048795d30857235d376ef8e85d20 [file] [log] [blame]
#pragma once
#include <QString>
#include <QList>
#include "Evaluator.h"
#include "AstNode.h"
class Repl
{
public:
Repl();
void start();
char *prompt();
protected:
QString readLine();
void addHistory(QString line);
bool trySpecialCase(QString line);
bool tryEvaluate(QString line, QList<AstNode> *expr);
Evaluator _eval;
bool _running = true;
};