public void pop() {
    if (depth <= 0) {
      throw new IllegalStateException("Cannot over-pop the stack.");
    }
    scope[depth] = null;
    added[depth] = null;
    depth--;
  }
public void pop()