aboutsummaryrefslogtreecommitdiff
path: root/src/openvic-dataloader/v2script/Parser.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/openvic-dataloader/v2script/Parser.cpp')
-rw-r--r--src/openvic-dataloader/v2script/Parser.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/openvic-dataloader/v2script/Parser.cpp b/src/openvic-dataloader/v2script/Parser.cpp
index 9c6a0c5..2375a1a 100644
--- a/src/openvic-dataloader/v2script/Parser.cpp
+++ b/src/openvic-dataloader/v2script/Parser.cpp
@@ -12,6 +12,7 @@
#include <openvic-dataloader/detail/Concepts.hpp>
#include <openvic-dataloader/detail/Encoding.hpp>
#include <openvic-dataloader/detail/OStreamOutputIterator.hpp>
+#include <openvic-dataloader/detail/SymbolIntern.hpp>
#include <openvic-dataloader/detail/Utility.hpp>
#include <openvic-dataloader/v2script/AbstractSyntaxTree.hpp>
@@ -269,6 +270,13 @@ std::string_view Parser::value(const ovdl::v2script::ast::FlatValue* node) const
return node->value().view();
}
+ovdl::symbol<char> Parser::find_intern(std::string_view string) const {
+ if (!_parse_handler->is_valid()) {
+ return ovdl::symbol<char>();
+ }
+ return _parse_handler->parse_state().ast().symbol_interner().find_intern(string.data(), string.size());
+}
+
std::string Parser::make_native_string() const {
return _parse_handler->parse_state().ast().make_native_visualizer();
}