Skip to content

Commit

Permalink
Fix docs mismatch
Browse files Browse the repository at this point in the history
  • Loading branch information
jakeheis committed Mar 31, 2018
1 parent d6f00af commit 70338b1
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions Sources/BeakCore/SwiftParser.swift
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,11 @@ public struct SwiftParser {
// merge docs into structure
var subStructure = structure.dictionary.substructure
let swiftDocs = SwiftDocs(file: file, arguments: [])!
for (index, docStructure) in swiftDocs.docsDictionary.substructure.enumerated() {
subStructure[index][SwiftDocKey.documentationComment.rawValue] = docStructure[SwiftDocKey.documentationComment.rawValue]

for docStructure in swiftDocs.docsDictionary.substructure {
if let index = subStructure.index(where: { $0.int(.nameOffset) == docStructure.int(.nameOffset) }) {
subStructure[index][SwiftDocKey.documentationComment.rawValue] = docStructure[SwiftDocKey.documentationComment.rawValue]
}
}
return try subStructure
.filter { $0.kind == .functionFree && $0.accessibility == .public }
Expand Down

0 comments on commit 70338b1

Please sign in to comment.