From 5f45a2c26392f581f663cb648f19583b0f64335b Mon Sep 17 00:00:00 2001 From: AndyZe Date: Wed, 20 Nov 2024 14:18:39 -0600 Subject: [PATCH] Additional XML verification for Control nodes --- src/xml_parsing.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/xml_parsing.cpp b/src/xml_parsing.cpp index 32a1e42ab..50af9be2a 100644 --- a/src/xml_parsing.cpp +++ b/src/xml_parsing.cpp @@ -541,6 +541,18 @@ void VerifyXML(const std::string& xml_text, ThrowError(line_number, std::string("The node <") + name + "> must have 1 or more children"); } + if (name == "ReactiveSequence") + { + const std::string child_name = node->FirstChildElement()->Name(); + const auto child_search = registered_nodes.find(child_name); + auto child_type = child_search->second; + // TODO: what this really needs to check is if the child is async + if (child_type != NodeType::CONDITION) + { + ThrowError(line_number, + std::string("The first child of a ReactiveSequence cannot be asynchronous")); + } + } } } //recursion