aboutsummaryrefslogtreecommitdiff
path: root/src/openvic-dataloader/v2script
diff options
context:
space:
mode:
author Spartan322 <Megacake1234@gmail.com>2024-07-06 12:49:39 +0200
committer Spartan322 <Megacake1234@gmail.com>2024-07-06 12:49:39 +0200
commit760523a45a348c26c87eb59657204f0e3cd90b26 (patch)
tree376aa0c401ed72f61e74706fde4ceb367d7a4b41 /src/openvic-dataloader/v2script
parent4a49007492152037bc1e9636b024cc67700e9dae (diff)
Add find_intern to v2script Parseradd/find_intern
Diffstat (limited to 'src/openvic-dataloader/v2script')
-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();
}