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 FileDescriptorProto.ListFields() method to extract the DescriptorProto objects I care about as well as the SourceCodeInfo.
To my knowledge, the only way to pair up Location fields with the corresponding objects is via the path attribute. 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 nested_types 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.
In short: How can I easily pair up DescriptorProto objects with the Location objects that correspond to them? Specifically for comment parsing purposes.
--
You received this message because you are subscribed to the Google Groups "Protocol Buffers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to protobuf+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/protobuf/0c8d36db-53f9-4179-942f-201cd205b9dfn%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/protobuf/e97868df-f57d-45bf-b4f5-eeb0e2f4eed3n%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/protobuf/94923187-2142-44ad-b0b8-97d1c12a5d5fn%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/protobuf/17cbf006-fb8c-440e-8f51-6c02d83c0f5dn%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/protobuf/9986364e-8b09-4cc3-aa23-999f4c026ff8n%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/protobuf/2e873dab-4859-4f49-b1a0-78193bc5e169n%40googlegroups.com.