aboutsummaryrefslogtreecommitdiff
path: root/src/openvic-dataloader/v2script/ParseState.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/openvic-dataloader/v2script/ParseState.hpp')
-rw-r--r--src/openvic-dataloader/v2script/ParseState.hpp23
1 files changed, 23 insertions, 0 deletions
diff --git a/src/openvic-dataloader/v2script/ParseState.hpp b/src/openvic-dataloader/v2script/ParseState.hpp
new file mode 100644
index 0000000..8e29bf5
--- /dev/null
+++ b/src/openvic-dataloader/v2script/ParseState.hpp
@@ -0,0 +1,23 @@
+#pragma once
+
+#include <openvic-dataloader/File.hpp>
+#include <openvic-dataloader/ParseState.hpp>
+#include <openvic-dataloader/v2script/AbstractSyntaxTree.hpp>
+
+#include <lexy/encoding.hpp>
+
+namespace ovdl::v2script::ast {
+ using File = ovdl::BasicFile<lexy::default_encoding, Node>;
+ struct AbstractSyntaxTree : ovdl::BasicAbstractSyntaxTree<File, FileTree> {
+ using BasicAbstractSyntaxTree::BasicAbstractSyntaxTree;
+
+ std::string make_list_visualizer() const;
+ std::string make_native_visualizer() const;
+ };
+
+ using ParseState = ovdl::ParseState<AbstractSyntaxTree>;
+
+ static_assert(IsFile<ast::File>, "File failed IsFile concept");
+ static_assert(IsAst<ast::AbstractSyntaxTree>, "AbstractSyntaxTree failed IsAst concept");
+ static_assert(IsParseState<ast::ParseState>, "ParseState failed IsParseState concept");
+} \ No newline at end of file