aboutsummaryrefslogtreecommitdiff
path: root/include/openvic-dataloader/v2script/Parser.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'include/openvic-dataloader/v2script/Parser.hpp')
-rw-r--r--include/openvic-dataloader/v2script/Parser.hpp27
1 files changed, 27 insertions, 0 deletions
diff --git a/include/openvic-dataloader/v2script/Parser.hpp b/include/openvic-dataloader/v2script/Parser.hpp
new file mode 100644
index 0000000..53aab90
--- /dev/null
+++ b/include/openvic-dataloader/v2script/Parser.hpp
@@ -0,0 +1,27 @@
+#pragma once
+
+#include <cstddef>
+#include <cstdio>
+#include <ostream>
+
+namespace ovdl::v2script {
+ class Parser {
+ public:
+ static Parser from_buffer(char8_t* data, std::size_t size);
+ static Parser from_buffer(char8_t* start, char8_t* end);
+ static Parser from_file(const char8_t* path);
+
+ void set_error_log_to_stderr();
+ void set_error_log_path(const char8_t* path);
+ void set_error_log_to(std::basic_ostream<char8_t> stream);
+ void set_error_log_to(std::FILE* file);
+
+ bool parse();
+
+ bool has_error();
+ bool has_warning();
+
+ private:
+ Parser();
+ };
+} \ No newline at end of file