String filename = ((IString) loc.get("filename")).getValue();
return factory.sourceLocation(filename, 0, 0,
0, 0, 0, 0);
} else if (type == Location_Area) {
String filename = "/";
IConstructor area = (IConstructor) loc.get("area");
if (area.getConstructorType() == Area_Area) {
int offset = ((IInteger) area.get("offset")).intValue();
int startLine = ((IInteger) area.get("beginLine")).intValue();
int endLine = ((IInteger) area.get("endLine")).intValue();
int startCol = ((IInteger) area.get("beginColumn")).intValue();
int endCol = ((IInteger) area.get("endColumn")).intValue();
int length = ((IInteger) area.get("length")).intValue();
return factory.sourceLocation(filename,
offset, length, startLine, endLine, startCol, endCol);
}
throw new UnexpectedConstructorTypeException(Area, area.getType());
} else if (type == Location_AreaInFile) {
String filename = ((IString) loc.get("filename")).getValue();
IConstructor area = (IConstructor) loc.get("area");
if (area.getConstructorType() == Area_Area) {
int offset = ((IInteger) area.get("offset")).intValue();
int startLine = ((IInteger) area.get("beginLine")).intValue();
int endLine = ((IInteger) area.get("endLine")).intValue();
int startCol = ((IInteger) area.get("beginColumn")).intValue();
int endCol = ((IInteger) area.get("endColumn")).intValue();
int length = ((IInteger) area.get("length")).intValue();
return factory.sourceLocation(filename,
offset, length, startLine, endLine, startCol, endCol);
}
throw new UnexpectedConstructorTypeException(Area, area.getType());
}
throw new UnexpectedConstructorTypeException(Location, type);
}