aboutsummaryrefslogtreecommitdiff
path: root/src/MoonP/moon_compiler.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/MoonP/moon_compiler.h')
-rw-r--r--src/MoonP/moon_compiler.h12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/MoonP/moon_compiler.h b/src/MoonP/moon_compiler.h
index 0739a59..36fd77a 100644
--- a/src/MoonP/moon_compiler.h
+++ b/src/MoonP/moon_compiler.h
@@ -9,6 +9,7 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
9#pragma once 9#pragma once
10 10
11#include <string> 11#include <string>
12#include <string_view>
12#include <tuple> 13#include <tuple>
13#include <list> 14#include <list>
14#include <memory> 15#include <memory>
@@ -31,6 +32,15 @@ struct GlobalVar {
31 32
32using GlobalVars = std::unique_ptr<std::list<GlobalVar>>; 33using GlobalVars = std::unique_ptr<std::list<GlobalVar>>;
33 34
34std::tuple<std::string,std::string,GlobalVars> moonCompile(const std::string& codes, const MoonConfig& config = {}); 35class MoonCompilerImpl;
36
37class MoonCompiler {
38public:
39 MoonCompiler();
40 virtual ~MoonCompiler();
41 std::tuple<std::string,std::string,GlobalVars> compile(std::string_view codes, const MoonConfig& config = {});
42private:
43 std::unique_ptr<MoonCompilerImpl> _compiler;
44};
35 45
36} // namespace MoonP 46} // namespace MoonP