aboutsummaryrefslogtreecommitdiff
path: root/src/openvic-dataloader
diff options
context:
space:
mode:
author George L. Albany <Megacake1234@gmail.com>2024-05-15 21:36:02 +0200
committer GitHub <noreply@github.com>2024-05-15 21:36:02 +0200
commit7b521d6023113372cf6b02e562828273c4040f0e (patch)
tree7bd53754f6294a11f81774593aa15cf43b3dc26e /src/openvic-dataloader
parenta5a6ff376cf0ff8fa48fcd750c16395b099223a4 (diff)
parent9802f0b500fd753b49b1785edbe204d46aac4b3d (diff)
Merge pull request #45 from OpenVicProject/fix/includes
Expose dataloader includes
Diffstat (limited to 'src/openvic-dataloader')
-rw-r--r--src/openvic-dataloader/v2script/AbstractSyntaxTree.cpp1
-rw-r--r--src/openvic-dataloader/v2script/EventGrammar.hpp1
-rw-r--r--src/openvic-dataloader/v2script/LuaDefinesGrammar.hpp5
-rw-r--r--src/openvic-dataloader/v2script/ModifierGrammar.hpp1
-rw-r--r--src/openvic-dataloader/v2script/ParseState.hpp23
-rw-r--r--src/openvic-dataloader/v2script/Parser.cpp1
-rw-r--r--src/openvic-dataloader/v2script/SimpleGrammar.hpp1
7 files changed, 31 insertions, 2 deletions
diff --git a/src/openvic-dataloader/v2script/AbstractSyntaxTree.cpp b/src/openvic-dataloader/v2script/AbstractSyntaxTree.cpp
index 4754d8e..abade40 100644
--- a/src/openvic-dataloader/v2script/AbstractSyntaxTree.cpp
+++ b/src/openvic-dataloader/v2script/AbstractSyntaxTree.cpp
@@ -8,6 +8,7 @@
#include <dryad/node.hpp>
#include <dryad/tree.hpp>
+#include "ParseState.hpp"
#include <range/v3/view/drop.hpp>
using namespace ovdl::v2script::ast;
diff --git a/src/openvic-dataloader/v2script/EventGrammar.hpp b/src/openvic-dataloader/v2script/EventGrammar.hpp
index c81a173..27f6459 100644
--- a/src/openvic-dataloader/v2script/EventGrammar.hpp
+++ b/src/openvic-dataloader/v2script/EventGrammar.hpp
@@ -11,6 +11,7 @@
#include "openvic-dataloader/NodeLocation.hpp"
+#include "ParseState.hpp"
#include "SimpleGrammar.hpp"
#include "detail/dsl.hpp"
#include "v2script/AiBehaviorGrammar.hpp"
diff --git a/src/openvic-dataloader/v2script/LuaDefinesGrammar.hpp b/src/openvic-dataloader/v2script/LuaDefinesGrammar.hpp
index 4d27d3e..96cce99 100644
--- a/src/openvic-dataloader/v2script/LuaDefinesGrammar.hpp
+++ b/src/openvic-dataloader/v2script/LuaDefinesGrammar.hpp
@@ -1,10 +1,11 @@
#pragma once
+#include <openvic-dataloader/v2script/AbstractSyntaxTree.hpp>
+
#include <lexy/_detail/config.hpp>
#include <lexy/dsl.hpp>
-#include "openvic-dataloader/v2script/AbstractSyntaxTree.hpp"
-
+#include "ParseState.hpp"
#include "SimpleGrammar.hpp"
#include "detail/dsl.hpp"
diff --git a/src/openvic-dataloader/v2script/ModifierGrammar.hpp b/src/openvic-dataloader/v2script/ModifierGrammar.hpp
index d6dbb32..22592d4 100644
--- a/src/openvic-dataloader/v2script/ModifierGrammar.hpp
+++ b/src/openvic-dataloader/v2script/ModifierGrammar.hpp
@@ -10,6 +10,7 @@
#include "openvic-dataloader/NodeLocation.hpp"
+#include "ParseState.hpp"
#include "SimpleGrammar.hpp"
#include "TriggerGrammar.hpp"
#include "detail/dsl.hpp"
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
diff --git a/src/openvic-dataloader/v2script/Parser.cpp b/src/openvic-dataloader/v2script/Parser.cpp
index a4cad9d..eb491d5 100644
--- a/src/openvic-dataloader/v2script/Parser.cpp
+++ b/src/openvic-dataloader/v2script/Parser.cpp
@@ -31,6 +31,7 @@
#include "openvic-dataloader/Error.hpp"
+#include "ParseState.hpp"
#include "detail/DetectUtf8.hpp"
#include "detail/NullBuff.hpp"
#include "detail/ParseHandler.hpp"
diff --git a/src/openvic-dataloader/v2script/SimpleGrammar.hpp b/src/openvic-dataloader/v2script/SimpleGrammar.hpp
index 731a7f1..37e295f 100644
--- a/src/openvic-dataloader/v2script/SimpleGrammar.hpp
+++ b/src/openvic-dataloader/v2script/SimpleGrammar.hpp
@@ -8,6 +8,7 @@
#include <lexy/dsl/identifier.hpp>
#include <lexy/dsl/symbol.hpp>
+#include "ParseState.hpp"
#include "detail/dsl.hpp"
// Grammar Definitions //