diff options
author | Spartan322 <Megacake1234@gmail.com> | 2023-07-25 02:24:01 +0200 |
---|---|---|
committer | Spartan322 <Megacake1234@gmail.com> | 2023-07-26 23:54:58 +0200 |
commit | be1d0545c2f7a85a63d05b4bdc1020ee284e72cb (patch) | |
tree | 09cb0fa0a1dbe83d4833bcd62dc8832161e4329b /include/openvic-dataloader/v2script | |
parent | 65443efcc2f4c7d687b2bd9c631f6bb426688bbf (diff) |
Initial structural commit
Diffstat (limited to 'include/openvic-dataloader/v2script')
-rw-r--r-- | include/openvic-dataloader/v2script/Parser.hpp | 27 |
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 |