public Object visit(Program program) { Object temp; for (ICClass icClass : program.getClasses()) { temp = icClass.accept(this); if (temp != null) { return temp; } } return null; }
@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; }
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; }
@Override public Object visit(Program program) throws SemanticError { for (ICClass icClass : program.getClasses()) icClass.accept(this); return null; }