depth method

  1. @override
int depth()
override

Calculate the depth of the expression tree.

Implementation

@override
int depth() {
  return 1 + operand.depth();
}