MCPcopy Create free account
hub / github.com/codereader/DarkRadiant / foreachBlock

Method foreachBlock

libs/parser/DefBlockSyntaxParser.h:354–364  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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)

Callers 3

parseBlockFunction · 0.80

Calls 2

getChildrenMethod · 0.80
getTypeMethod · 0.45

Tested by

no test coverage detected