Initial commit
This commit is contained in:
37
include/fsh.hpp
Normal file
37
include/fsh.hpp
Normal file
@ -0,0 +1,37 @@
|
||||
#pragma once
|
||||
|
||||
#include <unordered_map>
|
||||
#include <iostream>
|
||||
|
||||
#include "ast/ast.hpp"
|
||||
#include "util/input.hpp"
|
||||
|
||||
namespace fsh
|
||||
{
|
||||
|
||||
|
||||
|
||||
class fsh
|
||||
{
|
||||
|
||||
public:
|
||||
std::unordered_map<std::string, std::string> environment;
|
||||
|
||||
static fsh& instance() {
|
||||
static fsh f;
|
||||
return f;
|
||||
}
|
||||
|
||||
void run_line(std::string &line, std::istream &in = util::cin, std::ostream &out = std::cout);
|
||||
void run();
|
||||
|
||||
private:
|
||||
fsh(){
|
||||
environment["PROMPT"] = "$";
|
||||
environment["QUIT"] = "";
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user