depth method

int depth()

Implementation

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