collectScopesRecursively static method
Recursively collect all scopes starting from a given scope
Implementation
static void collectScopesRecursively(
ZenScope scope, List<ZenScope> collection) {
// Add the current scope
collection.add(scope);
// Recursively add all child scopes
for (final child in scope.childScopes) {
collectScopesRecursively(child, collection);
}
}