depth method

int depth()
inherited

Implementation

int depth() {
  var n = 0;
  RuleContext? p = this;
  while (p != null) {
    p = p.parent;
    n++;
  }
  return n;
}