use of ast.Ast.ConcreteHeader in project L42 by ElvisResearchGroup.
the class Desugar method visit.
public Expression visit(ClassB s) {
Position pos = s.getP();
assert !(s.getH() instanceof ConcreteHeader);
if (!s.getFields().isEmpty()) {
List<Member> ms = s.getFields().stream().flatMap(f -> Desugar.field(pos, f)).collect(Collectors.toList());
ms.addAll(s.getMs());
s = s.withMs(ms).withH(new Ast.TraitHeader());
}
Set<String> oldUsedVars = this.usedVars;
HashMap<String, Type> oldVarEnv = this.varEnv;
try {
s = (ClassB) super.visit(s);
s = FlatFirstLevelLocalNestedClasses.of(s, this);
s = DesugarCatchDefault.of(s);
return s;
} finally {
this.usedVars = oldUsedVars;
this.varEnv = oldVarEnv;
}
}
Aggregations