Skip to content

Commit 9b6d64e

Browse files
review: rename DoxygenParam -> DoxygenParameter
1 parent ed92195 commit 9b6d64e

File tree

5 files changed

+18
-18
lines changed

5 files changed

+18
-18
lines changed

Sources/Markdown/Base/Markup.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ func makeMarkup(_ data: _MarkupData) -> Markup {
7272
case .inlineAttributes:
7373
return InlineAttributes(data)
7474
case .doxygenParam:
75-
return DoxygenParam(data)
75+
return DoxygenParameter(data)
7676
case .doxygenReturns:
7777
return DoxygenReturns(data)
7878
}

Sources/Markdown/Block Nodes/Block Container Blocks/Doxygen Commands/DoxygenParam.swift renamed to Sources/Markdown/Block Nodes/Block Container Blocks/Doxygen Commands/DoxygenParameter.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ import Foundation
2222
/// For more information about transformation matrices, refer to the Transformation
2323
/// documentation.
2424
/// ```
25-
public struct DoxygenParam: BlockContainer {
25+
public struct DoxygenParameter: BlockContainer {
2626
public var _data: _MarkupData
2727

2828
init(_ raw: RawMarkup) throws {
@@ -38,11 +38,11 @@ public struct DoxygenParam: BlockContainer {
3838
}
3939

4040
public func accept<V: MarkupVisitor>(_ visitor: inout V) -> V.Result {
41-
return visitor.visitDoxygenParam(self)
41+
return visitor.visitDoxygenParameter(self)
4242
}
4343
}
4444

45-
public extension DoxygenParam {
45+
public extension DoxygenParameter {
4646
/// Create a new Doxygen parameter definition.
4747
///
4848
/// - Parameter name: The name of the parameter being described.

Sources/Markdown/Visitor/MarkupVisitor.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,7 @@ public protocol MarkupVisitor {
281281
- parameter doxygenParam: A `DoxygenParam` element.
282282
- returns: The result of the visit.
283283
*/
284-
mutating func visitDoxygenParam(_ doxygenParam: DoxygenParam) -> Result
284+
mutating func visitDoxygenParameter(_ doxygenParam: DoxygenParameter) -> Result
285285

286286
/**
287287
Visit a `DoxygenReturns` element and return the result.
@@ -389,7 +389,7 @@ extension MarkupVisitor {
389389
public mutating func visitInlineAttributes(_ attributes: InlineAttributes) -> Result {
390390
return defaultVisit(attributes)
391391
}
392-
public mutating func visitDoxygenParam(_ doxygenParam: DoxygenParam) -> Result {
392+
public mutating func visitDoxygenParameter(_ doxygenParam: DoxygenParameter) -> Result {
393393
return defaultVisit(doxygenParam)
394394
}
395395
public mutating func visitDoxygenReturns(_ doxygenReturns: DoxygenReturns) -> Result {

Sources/Markdown/Walker/Walkers/MarkupTreeDumper.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -287,7 +287,7 @@ struct MarkupTreeDumper: MarkupWalker {
287287
dump(attributes, customDescription: "attributes: `\(attributes.attributes)`")
288288
}
289289

290-
mutating func visitDoxygenParam(_ doxygenParam: DoxygenParam) -> () {
290+
mutating func visitDoxygenParameter(_ doxygenParam: DoxygenParameter) -> () {
291291
dump(doxygenParam, customDescription: "parameter: \(doxygenParam.name)")
292292
}
293293
}

Tests/MarkdownTests/Parsing/DoxygenCommandParserTests.swift

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,12 @@ class DoxygenCommandParserTests: XCTestCase {
2020
"""
2121

2222
let document = Document(parsing: source, options: parseOptions)
23-
let param = try XCTUnwrap(document.child(at: 0) as? DoxygenParam)
23+
let param = try XCTUnwrap(document.child(at: 0) as? DoxygenParameter)
2424
XCTAssertEqual(param.name, "thing")
2525

2626
let expectedDump = """
2727
Document
28-
└─ DoxygenParam parameter: thing
28+
└─ DoxygenParameter parameter: thing
2929
└─ Paragraph
3030
└─ Text "The thing."
3131
"""
@@ -60,12 +60,12 @@ class DoxygenCommandParserTests: XCTestCase {
6060
"""#
6161

6262
let document = Document(parsing: source, options: parseOptions)
63-
let param = try XCTUnwrap(document.child(at: 0) as? DoxygenParam)
63+
let param = try XCTUnwrap(document.child(at: 0) as? DoxygenParameter)
6464
XCTAssertEqual(param.name, "thing")
6565

6666
let expectedDump = """
6767
Document
68-
└─ DoxygenParam parameter: thing
68+
└─ DoxygenParameter parameter: thing
6969
└─ Paragraph
7070
└─ Text "The thing."
7171
"""
@@ -82,7 +82,7 @@ class DoxygenCommandParserTests: XCTestCase {
8282

8383
let expectedDump = """
8484
Document
85-
└─ DoxygenParam parameter: thing
85+
└─ DoxygenParameter parameter: thing
8686
└─ Paragraph
8787
├─ Text "The thing."
8888
├─ SoftBreak
@@ -102,7 +102,7 @@ class DoxygenCommandParserTests: XCTestCase {
102102

103103
let expectedDump = """
104104
Document
105-
├─ DoxygenParam parameter: thing
105+
├─ DoxygenParameter parameter: thing
106106
│ └─ Paragraph
107107
│ └─ Text "The thing."
108108
└─ Paragraph
@@ -125,10 +125,10 @@ class DoxygenCommandParserTests: XCTestCase {
125125
Document
126126
├─ Paragraph
127127
│ └─ Text "Messes with the thing."
128-
├─ DoxygenParam parameter: thing
128+
├─ DoxygenParameter parameter: thing
129129
│ └─ Paragraph
130130
│ └─ Text "The thing."
131-
└─ DoxygenParam parameter: otherThing
131+
└─ DoxygenParameter parameter: otherThing
132132
└─ Paragraph
133133
└─ Text "The other thing."
134134
"""
@@ -151,7 +151,7 @@ class DoxygenCommandParserTests: XCTestCase {
151151
Document
152152
├─ Paragraph
153153
│ └─ Text "Messes with the thing."
154-
├─ DoxygenParam parameter: thing
154+
├─ DoxygenParameter parameter: thing
155155
│ └─ Paragraph
156156
│ └─ Text "The thing."
157157
└─ BlockDirective name: "Comment"
@@ -173,7 +173,7 @@ class DoxygenCommandParserTests: XCTestCase {
173173
Document
174174
├─ Paragraph
175175
│ └─ Text "This is a paragraph."
176-
└─ DoxygenParam parameter: thing
176+
└─ DoxygenParameter parameter: thing
177177
└─ Paragraph
178178
└─ Text "The thing."
179179
"""
@@ -191,7 +191,7 @@ class DoxygenCommandParserTests: XCTestCase {
191191
// FIXME: The source location for the first description line is wrong
192192
let expectedDump = """
193193
Document @1:1-2:39
194-
└─ DoxygenParam @1:1-2:39 parameter: thing
194+
└─ DoxygenParameter @1:1-2:39 parameter: thing
195195
└─ Paragraph @1:14-2:39
196196
├─ Text @1:14-1:24 "The thing."
197197
├─ SoftBreak

0 commit comments

Comments
 (0)