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

Commit 123d040

Browse files
committed
Reorder operations in members component
1 parent 1ba8ead commit 123d040

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Sources/swift-doc/Supporting Types/Components/Members.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@ struct Members: Component {
1616
var cases: [Symbol]
1717
var properties: [Symbol]
1818
var methods: [Symbol]
19+
let operatorImplementations: [Symbol]
1920
var genericallyConstrainedMembers: [[GenericRequirement] : [Symbol]]
2021
let defaultImplementations: [Symbol]
21-
let operators: [Symbol]
2222

2323
init(of symbol: Symbol, in module: Module, baseURL: String, symbolFilter: (Symbol) -> Bool) {
2424
self.symbol = symbol
@@ -34,9 +34,9 @@ struct Members: Component {
3434
self.cases = members.filter { $0.api is Enumeration.Case }
3535
self.properties = members.filter { $0.api is Variable }
3636
self.methods = members.filter { ($0.api as? Function)?.isOperator == false }
37+
self.operatorImplementations = members.filter { ($0.api as? Function)?.isOperator == true }
3738
self.genericallyConstrainedMembers = Dictionary(grouping: members) { $0.`extension`?.genericRequirements ?? [] }.filter { !$0.key.isEmpty }
3839
self.defaultImplementations = module.interface.defaultImplementations(of: symbol).filter(symbolFilter)
39-
self.operators = members.filter { ($0.api as? Function)?.isOperator == true }
4040
}
4141

4242
var sections: [(title: String, members: [Symbol])] {
@@ -46,8 +46,8 @@ struct Members: Component {
4646
("Enumeration Cases", cases),
4747
("Properties", properties),
4848
("Methods", methods),
49+
("Operators", operatorImplementations),
4950
("Default Implementations", defaultImplementations),
50-
("Operators", operators),
5151
].filter { !$0.members.isEmpty }
5252
}
5353

0 commit comments

Comments
 (0)