| 352 | } |
| 353 | |
| 354 | void foreachBlock(const std::function<void(const DefBlockSyntax::Ptr&)>& functor) |
| 355 | { |
| 356 | for (const auto& node : getRoot()->getChildren()) |
| 357 | { |
| 358 | if (!node || node->getType() != DefSyntaxNode::Type::DeclBlock) continue; |
| 359 | |
| 360 | auto blockNode = std::static_pointer_cast<DefBlockSyntax>(node); |
| 361 | |
| 362 | functor(blockNode); |
| 363 | } |
| 364 | } |
| 365 | |
| 366 | // Return the first block syntax node matching the given name (case-sensitive) |
| 367 | parser::DefBlockSyntax::Ptr findFirstNamedBlock(const std::string& name) |
no test coverage detected