Skip to content
This repository was archived by the owner on Jun 1, 2023. It is now read-only.

Add possibility to include private symbols. #266

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

### Added

- Added support for generating documentation for
private symbols.
#266 by @Lukas-Stuehrk

### Fixed

- Fixed bug that caused prefix and postfix operators to be omitted
Expand Down
3 changes: 3 additions & 0 deletions Sources/swift-doc/Supporting Types/AccessLevel.swift
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,16 @@ import SwiftDoc
enum AccessLevel: String, ExpressibleByArgument {
case `public`
case `internal`
case `private`

func includes(symbol: Symbol) -> Bool {
switch self {
case .public:
return symbol.isPublic
case .internal:
return symbol.isPublic || symbol.isInternal
case .private:
return true
}
}
}