Merge "Change bpdoc to separate entries with the same type"
This commit is contained in:
commit
0bf636f3ef
1 changed files with 0 additions and 26 deletions
|
@ -81,7 +81,6 @@ func AllPackages(pkgFiles map[string][]string, moduleTypeNameFactories map[strin
|
||||||
removeEmptyPropertyStructs(mtInfo)
|
removeEmptyPropertyStructs(mtInfo)
|
||||||
collapseDuplicatePropertyStructs(mtInfo)
|
collapseDuplicatePropertyStructs(mtInfo)
|
||||||
collapseNestedPropertyStructs(mtInfo)
|
collapseNestedPropertyStructs(mtInfo)
|
||||||
combineDuplicateProperties(mtInfo)
|
|
||||||
|
|
||||||
// Add the ModuleInfo to the corresponding Package map/slice entries.
|
// Add the ModuleInfo to the corresponding Package map/slice entries.
|
||||||
pkg := pkgMap[mtInfo.PkgPath]
|
pkg := pkgMap[mtInfo.PkgPath]
|
||||||
|
@ -336,28 +335,3 @@ func collapseNestedProperties(p *[]Property) {
|
||||||
}
|
}
|
||||||
*p = n
|
*p = n
|
||||||
}
|
}
|
||||||
|
|
||||||
func combineDuplicateProperties(mt *ModuleType) {
|
|
||||||
for _, ps := range mt.PropertyStructs {
|
|
||||||
combineDuplicateSubProperties(&ps.Properties)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
func combineDuplicateSubProperties(p *[]Property) {
|
|
||||||
var n []Property
|
|
||||||
propertyLoop:
|
|
||||||
for _, child := range *p {
|
|
||||||
if len(child.Properties) > 0 {
|
|
||||||
combineDuplicateSubProperties(&child.Properties)
|
|
||||||
for i := range n {
|
|
||||||
s := &n[i]
|
|
||||||
if s.SameSubProperties(child) {
|
|
||||||
s.OtherNames = append(s.OtherNames, child.Name)
|
|
||||||
continue propertyLoop
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
n = append(n, child)
|
|
||||||
}
|
|
||||||
*p = n
|
|
||||||
}
|
|
||||||
|
|
Loading…
Reference in a new issue