Skip to content

Commit ff14d91

Browse files
author
AndyZe
committed
Parse for async nodes based on node name
1 parent 5f45a2c commit ff14d91

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

src/xml_parsing.cpp

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -541,16 +541,17 @@ void VerifyXML(const std::string& xml_text,
541541
ThrowError(line_number,
542542
std::string("The node <") + name + "> must have 1 or more children");
543543
}
544-
if (name == "ReactiveSequence")
544+
if(name == "ReactiveSequence")
545545
{
546546
const std::string child_name = node->FirstChildElement()->Name();
547547
const auto child_search = registered_nodes.find(child_name);
548548
auto child_type = child_search->second;
549-
// TODO: what this really needs to check is if the child is async
550-
if (child_type != NodeType::CONDITION)
549+
if(child_type == NodeType::CONTROL &&
550+
((child_name == "ThreadedAction") || (child_name == "StatefulActionNode") ||
551+
(child_name == "CoroActionNode")))
551552
{
552-
ThrowError(line_number,
553-
std::string("The first child of a ReactiveSequence cannot be asynchronous"));
553+
ThrowError(line_number, std::string("The first child of a ReactiveSequence "
554+
"cannot be asynchronous"));
554555
}
555556
}
556557
}

0 commit comments

Comments
 (0)