use of jkind.lustre.RecordType in project AGREE by loonwerks.
the class AgreeUtils method getLustreTypes.
public static List<TypeDef> getLustreTypes(AgreeProgram agreeProgram) {
List<TypeDef> types = new ArrayList<>();
for (Type type : agreeProgram.globalTypes) {
String typeName;
if (type instanceof RecordType) {
typeName = ((RecordType) type).id;
} else if (type instanceof EnumType) {
typeName = ((EnumType) type).id;
} else {
throw new AgreeException("Unable to handle type of type '" + type.getClass() + "'");
}
types.add(new TypeDef(typeName, type));
}
// add synonym types
types.addAll(getTypeSynonmyms());
return types;
}
Aggregations