Skip to content

Commit

Permalink
Additional XML verification for Control nodes
Browse files Browse the repository at this point in the history
  • Loading branch information
AndyZe committed Nov 20, 2024
1 parent 2bc72fd commit 5f45a2c
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/xml_parsing.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 5f45a2c

Please sign in to comment.