@Override
  public Object visit(ICClass icClass) throws SemanticError {
    for (Field field : icClass.getFields()) {
      field.accept(this);
    }
    for (Method method : icClass.getMethods()) {
      loopCount = 0;
      method.accept(this);

      method.accept(varInitChecker);
    }
    return null;
  }
Esempio n. 2
0
  public Object visit(ICClass icClass) {
    Object temp;
    for (Field field : icClass.getFields()) {
      temp = field.accept(this);
      if (temp != null) {
        return temp;
      }
    }

    for (Method method : icClass.getMethods()) {
      temp = method.accept(this);
      if (temp != null) {
        return temp;
      }
    }

    return null;
  }