Node ast = parseFileContents(file, readAndInjectCode(reader, loc, TYPE_INFERENCE_METHOD_NAME, "(?:\\.|::)", "."));
project.getGraph().load(ast);
TypeInferenceResult result = new TypeInferenceResult();
result.setAST(ast);
TypeSet ts = new TypeSet();
for (IRubyObject receiver : context.typeSet) {
ts.add(receiver.getMetaClass());
}
result.setTypeSet(ts);
return result;
} catch (IOException e) {
return TypeInferenceResult.failWithException("Cannot read file", e);