From 458180da5e61887cd9f820e573f307d0a640128d Mon Sep 17 00:00:00 2001 From: Spartan322 Date: Sat, 11 May 2024 14:37:50 -0400 Subject: Fix bugs in #37 Fix error handling dropping errors Fix error handling segfaults Improve error messages --- include/openvic-dataloader/v2script/Parser.hpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'include/openvic-dataloader/v2script/Parser.hpp') diff --git a/include/openvic-dataloader/v2script/Parser.hpp b/include/openvic-dataloader/v2script/Parser.hpp index cef1faf..ea42aa2 100644 --- a/include/openvic-dataloader/v2script/Parser.hpp +++ b/include/openvic-dataloader/v2script/Parser.hpp @@ -33,7 +33,7 @@ namespace ovdl::v2script { constexpr Parser& load_from_buffer(const char* data, std::size_t size); constexpr Parser& load_from_buffer(const char* start, const char* end); constexpr Parser& load_from_string(const std::string_view string); - constexpr Parser& load_from_file(const char* path); + Parser& load_from_file(const char* path); Parser& load_from_file(const std::filesystem::path& path); constexpr Parser& load_from_file(const detail::HasCstr auto& path) { @@ -47,14 +47,14 @@ namespace ovdl::v2script { const FileTree* get_file_node() const; - std::string_view value(const ovdl::v2script::ast::FlatValue& node) const; + std::string_view value(const ovdl::v2script::ast::FlatValue* node) const; std::string make_native_string() const; std::string make_list_string() const; const FilePosition get_position(const ast::Node* node) const; - using error_range = ovdl::detail::error_range; + using error_range = ovdl::detail::error_range; Parser::error_range get_errors() const; const FilePosition get_error_position(const error::Error* error) const; -- cgit v1.2.3-56-ga3b1