@Override
 public void visitJSStatement(@NotNull JSStatement statement) {
   super.visitJSStatement(statement);
   if (statement instanceof JSEmptyStatement || statement instanceof JSBlockStatement) {
     return;
   }
   statementCount++;
 }
  @Override
  public void visitJSElement(JSElement jsElement) {
    int oldCount = 0;
    if (jsElement instanceof JSFunction) {
      oldCount = statementCount;
    }
    super.visitJSElement(jsElement);

    if (jsElement instanceof JSFunction) {
      statementCount = oldCount;
    }
  }