super.visit(that);
}
@Override
public void visit(Tree.AnyClass that) {
Class c = that.getDeclarationModel();
visitDeclaration(that, c);
Scope o = enterScope(c);
super.visit(that);
exitScope(o);
if (that.getParameterList()==null) {
that.addError("missing parameter list in class declaration: '" +
name(that.getIdentifier()) + "' must have a parameter list", 1000);
}
else {
that.getParameterList().getModel().setFirst(true);
c.addParameterList(that.getParameterList().getModel());
}
//TODO: is this still necessary??
if (c.isClassOrInterfaceMember() &&
c.getContainer() instanceof TypedDeclaration) {
that.addUnsupportedError("nested classes of inner classes are not yet supported");
}
if (c.isAbstract() && c.isFinal()) {
that.addError("class may not be both abstract and final: '" +
name(that.getIdentifier()) + "'");
}
if (c.isFormal() && c.isFinal()) {
that.addError("class may not be both formal and final: '" +
name(that.getIdentifier()) + "'");
}
}