-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrepl.hpp
More file actions
38 lines (30 loc) · 966 Bytes
/
Copy pathrepl.hpp
File metadata and controls
38 lines (30 loc) · 966 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
// Etkilesimli kabuk.
//
// Kritik tasarim noktasi: her turun Source/Diagnostics/Program nesneleri
// YASAMAYA DEVAM ETMELI. Cunku 1. turda tanimlanan bir fonksiyon (FnObj)
// govdesine `const Stmt*` isaretcisi tutuyor -- o AST silinirse 2. turda
// fonksiyonu cagirmak coker.
#pragma once
#include <memory>
#include <string>
#include <vector>
#include "diag.hpp"
#include "interp.hpp"
#include "source.hpp"
namespace rs {
class Repl {
public:
Repl();
int run();
private:
void degerlendir(const std::string& kaynak);
static bool blokAciyorMu(const std::string& satir);
// Omur boyu tutulanlar -- yukaridaki nota bak.
std::vector<std::unique_ptr<Source>> kaynaklar_;
std::vector<std::unique_ptr<Diagnostics>> tanilar_;
std::vector<std::unique_ptr<Program>> programlar_;
std::unique_ptr<Source> oturumKaynak_;
std::unique_ptr<Diagnostics> oturumTani_;
std::unique_ptr<Interpreter> yorumlayici_;
};
} // namespace rs