Skip to content

Add nested parameter/returns/throws comment recognition #2132

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Apr 11, 2016
Merged

Add nested parameter/returns/throws comment recognition #2132

merged 3 commits into from
Apr 11, 2016

Conversation

bitjammer
Copy link
Contributor

This adds the capability to add further documentation underneath parameter list items so as to document the meaning of closure parameters for APIs that take a function as an argument. For example:

/// Brief.
///
/// - Parameter combine: A combining function
///   - Parameters:
///    - lhs: The left-hand side of the operator
///    - rhs: The right-hand side of the operator
///    - Returns: The result of the operator.
/// - Parameter lhs: The left-hand side to partially apply
func partial<T>(combine: (lhs: T, rhs: T) -> T, a: T) -> (T -> T) {
  // ...
}

rdar://problem/24794725

This was naming was cargoed from long ago and this functionality isn't
directly related to LLVM, it's specific to Swift.
Under parameter doc comment list items, allow function doc comment
syntax to nest so you can document the meaning of closure parameters'
signatures.

rdar://problem/24794725
@bitjammer
Copy link
Contributor Author

@swift-ci Please smoke test

@bitjammer bitjammer merged commit abed7b6 into swiftlang:master Apr 11, 2016
@bitjammer bitjammer deleted the closure-param-doc branch April 11, 2016 00:06
@bitjammer bitjammer restored the closure-param-doc branch April 11, 2016 00:06
@rjmccall
Copy link
Contributor

Cool.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants