add comment about tree traversal
This commit is contained in:
parent
4f138c4f92
commit
100279cd16
@ -136,6 +136,8 @@ func InitPathMaps(files []*descriptor.FileDescriptorProto) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// addToPathMap traverses through the AST adding SourceCodeInfo_Location entries to the pathMap.
|
||||||
|
// Since the AST is a tree, the recursion finishes once it has gone through all the nodes.
|
||||||
func addToPathMap(info *descriptor.SourceCodeInfo, i interface{}, path []int32) {
|
func addToPathMap(info *descriptor.SourceCodeInfo, i interface{}, path []int32) {
|
||||||
loc := findLoc(info, path)
|
loc := findLoc(info, path)
|
||||||
if loc != nil {
|
if loc != nil {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user