public void checkClosed(int previous){
  if (depth != previous) {
    throw new FormattingError(diagnostic(String.format("saw %d unclosed ops",depth)));
  }
}

public void checkClosed ( int previous ) { if ( depth != previous ) { throw new FormattingError ( diagnostic ( String . format ( "saw %d unclosed ops" , depth ) ) ) ; } }
checks that all open ops in the op stream have matching close ops .
