aboutsummaryrefslogtreecommitdiff
path: root/src/openvic-dataloader/AbstractSyntaxTree.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/openvic-dataloader/AbstractSyntaxTree.hpp')
-rw-r--r--src/openvic-dataloader/AbstractSyntaxTree.hpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/openvic-dataloader/AbstractSyntaxTree.hpp b/src/openvic-dataloader/AbstractSyntaxTree.hpp
index f9f5796..f2d941b 100644
--- a/src/openvic-dataloader/AbstractSyntaxTree.hpp
+++ b/src/openvic-dataloader/AbstractSyntaxTree.hpp
@@ -23,6 +23,7 @@
namespace ovdl {
struct AbstractSyntaxTree : SymbolIntern {
+ AbstractSyntaxTree() = default;
explicit AbstractSyntaxTree(std::size_t max_elements) : _symbol_interner(max_elements) {}
symbol_type intern(const char* str, std::size_t length);
@@ -51,6 +52,8 @@ namespace ovdl {
using root_node_type = RootNodeT;
using node_type = typename file_type::node_type;
+ BasicAbstractSyntaxTree() = default;
+
explicit BasicAbstractSyntaxTree(file_type&& file)
: AbstractSyntaxTree(file.size() * file.visit_buffer([](auto&& buffer) -> size_t { return sizeof(typename std::decay_t<decltype(buffer)>::char_type); })),
_file { std::move(file) } {}