Skip to content

Commit

Permalink
Parse for async nodes based on node name
Browse files Browse the repository at this point in the history
  • Loading branch information
AndyZe committed Nov 20, 2024
1 parent 5f45a2c commit ff14d91
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions src/xml_parsing.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -541,16 +541,17 @@ void VerifyXML(const std::string& xml_text,
ThrowError(line_number,
std::string("The node <") + name + "> must have 1 or more children");
}
if (name == "ReactiveSequence")
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)
if(child_type == NodeType::CONTROL &&
((child_name == "ThreadedAction") || (child_name == "StatefulActionNode") ||
(child_name == "CoroActionNode")))
{
ThrowError(line_number,
std::string("The first child of a ReactiveSequence cannot be asynchronous"));
ThrowError(line_number, std::string("The first child of a ReactiveSequence "
"cannot be asynchronous"));
}
}
}
Expand Down

0 comments on commit ff14d91

Please sign in to comment.