title: How to match DescriptorProto object with the corresponding SourceInfo Location field
body: <p>I'm parsing a large number of protobuf files and am using the Source Code Info descriptor to extract comment data from the source files as well. I currently use the <code>FileDescriptorProto.ListFields()</code> method to extract the DescriptorProto objects I care about as well as the SourceCodeInfo.</p>
  <p>To my knowledge, the only way to pair up Location fields with the corresponding objects is via the <a href="https://developers.google.com/protocol-buffers/docs/reference/cpp/google.protobuf.descriptor.pb" rel="nofollow noreferrer">path attribute</a>. This is fine; except for the fact that involves me manually stepping through said path to land at my parsed Protobuf Object. This gets complicated when dealing with layers of <code>nested_types</code> and I am convinced there must be a way for me to extract the path from the particular DescriptorProto Object and then use that to match up the object with the path specified in the corresponding Location field.</p>
  <p>In short: How can I easily pair up DescriptorProto objects with the Location objects that correspond to them? Specifically for comment parsing purposes.</p>