aboutsummaryrefslogtreecommitdiff
path: root/src/openvic-dataloader/v2script/AbstractSyntaxTree.cpp
diff options
context:
space:
mode:
author Hop311 <Hop3114@gmail.com>2023-11-11 11:20:07 +0100
committer GitHub <noreply@github.com>2023-11-11 11:20:07 +0100
commit0e7edc2b4a0dbafc670dfe2ce3ce4850825b1bcb (patch)
tree1369794c1a0fced9dc01b4e90b4f0f4f2e6c646d /src/openvic-dataloader/v2script/AbstractSyntaxTree.cpp
parentefc11f571794acd64884680834c6636a03e8322b (diff)
parent3a0f4872bf77578f5c53cb054a64e4d73c1a00f7 (diff)
Merge pull request #29 from OpenVicProject/make/list-nodes-support-list
Change nodes to support list checks
Diffstat (limited to 'src/openvic-dataloader/v2script/AbstractSyntaxTree.cpp')
-rw-r--r--src/openvic-dataloader/v2script/AbstractSyntaxTree.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/openvic-dataloader/v2script/AbstractSyntaxTree.cpp b/src/openvic-dataloader/v2script/AbstractSyntaxTree.cpp
index 5518e5d..45150cb 100644
--- a/src/openvic-dataloader/v2script/AbstractSyntaxTree.cpp
+++ b/src/openvic-dataloader/v2script/AbstractSyntaxTree.cpp
@@ -215,7 +215,7 @@ OVDL_AST_LIST_NODE_DEF(DecisionListNode, {
#undef OVDL_AST_LIST_NODE_DEF
-EventNode::EventNode(NodeLocation location, Type type, const std::vector<NodePtr>& statements) : Node(location),
+EventNode::EventNode(NodeLocation location, Type type, const std::vector<NodePtr>& statements) : AbstractListNode(location),
_type(type) {
copy_into_node_ptr_vector(statements, _statements);
}
@@ -233,7 +233,7 @@ std::ostream& EventNode::print(std::ostream& stream, size_t indent) const {
return stream << '}';
}
-DecisionNode::DecisionNode(NodeLocation location, NodePtr name, const std::vector<NodePtr>& statements) : Node(location),
+DecisionNode::DecisionNode(NodeLocation location, NodePtr name, const std::vector<NodePtr>& statements) : AbstractListNode(location),
_name(std::move(name)) {
copy_into_node_ptr_vector(statements, _statements);
}
@@ -261,7 +261,7 @@ std::ostream& ExecutionNode::print(std::ostream& stream, size_t indent) const {
return stream;
}
-ExecutionListNode::ExecutionListNode(NodeLocation location, ExecutionNode::Type type, const std::vector<NodePtr>& statements) : Node(location),
+ExecutionListNode::ExecutionListNode(NodeLocation location, ExecutionNode::Type type, const std::vector<NodePtr>& statements) : AbstractListNode(location),
_type(type) {
copy_into_node_ptr_vector(statements, _statements);
}