getScopeDepth static method
Get hierarchy depth for a specific scope
Implementation
static int getScopeDepth(ZenScope targetScope) {
int depth = 0;
ZenScope? current = targetScope.parent;
while (current != null) {
depth++;
current = current.parent;
}
return depth;
}