Commit Graph

12 Commits

Author SHA1 Message Date
Victoria Mitchell
fe14235116 review: rename Attribute to InlineAttributes in MarkupXML 2022-07-22 10:50:17 -06:00
Victoria Mitchell
76fe621c1f markup: add support for swift-cmark inline attributes
rdar://96830173
2022-07-21 08:13:07 -06:00
David Farler
a85e1d6f30 [Markup] Print Tags in documentation comment XML
This information needs to be picked up through SourceKit. It might be
useful as both metadata for sorting/filtering as well as presentation,
so it makes sense to print it in the normal XML inside CommentParts.

rdar://problem/32877771
2017-06-22 16:45:22 -07:00
Maxwell Swadling
452e535ba4 Updated quick help XML to separate the comment data from the metadata 2017-04-17 14:53:57 -07:00
David Farler
c20f3db09e Nesting parameter/returns/throws doc comments for closure parameters
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
2016-04-10 15:32:07 -07:00
David Farler
e87be804c9 [Markup] Slurp fenced code block info string
Add a language property for Markup code blocks - the default is
"swift" but will respect overrides such as the following:

```c++
Something::Somethign::create()
```

For code listings in doc comments written in other languages, such
as when you want to compare usage against another language.

rdar://problem/23948115
2015-12-17 17:51:27 -08:00
David Farler
dd44dad017 Add 'throws' keyword to doc comments
Adding the following to a doc comment:

- throws: ...

Will create a description about what/when the function will throw.
This should be a peer to "- returns:" and "- parameter:" and not appear
inline in the description.

rdar://problem/21621679

Swift SVN r29831
2015-07-01 02:03:25 +00:00
David Farler
b29220a27e Add a Requires field to doc comments
rdar://problem/20902140

Swift SVN r28446
2015-05-11 22:52:34 +00:00
David Farler
ca5876a866 swiftMarkup Library
Replace ReST-flavored documentation comments with Markdown.

rdar://problem/20180412

In addition to full Markdown support, the following extensions are
supported. These appear as lists at the top level of the comment's
"document". All of these extensions are matched without regard to
case.

Parameter Outlines
------------------

- Parameters:
  - x: ...
  - y: ...

Separate Parameters
-------------------

- parameter x: ...
- parameter y: ...

- Note:
Parameter documentation may be broken up across the entire comment,
with a mix of parameter documentation kinds - they'll be consolidated
in the end.

Returns
-------

- returns: ...

The following extensions are also list items at the top level, which
will also appear in Xcode QuickHelp as first-class citizens:

- Attention: ...
- Author: ...
- Authors: ...
- Bug: ...
- Complexity: ...
- Copyright: ...
- Date: ...
- Experiment: ...
- Important: ...
- Invariant: ...
- Note: ...
- Postcondition: ...
- Precondition: ...
- Remark: ...
- Remarks: ...
- See: ...
- Since: ...
- Todo: ...
- Version: ...
- Warning: ...

These match most of the extra fields in Doxygen, plus a few more per request.

Other changes
-------------
- Remove use of rawHTML for all markup AST nodes except for those
not representable by the Xcode QuickHelp XSLT - <h>, <hr/>, and of
course inline/block HTML itself.

- Update the doc comment RNG schema to more accurately reflect Xcode
QuickHelp.

- Clean up cmark CMake configuration.

- Rename "FullComment" to "DocComment"

- Update the Swift Standard Documentation (in a follow-up commit)

- Update SourceKit for minor changes and link against cmark
  (in a follow-up commit).

Swift SVN r27727
2015-04-26 00:07:15 +00:00
Dmitri Hrybenko
c4ef6bd032 Comment to XML conversion: adjust to upstream XML schema change
Swift SVN r17148
2014-05-01 08:51:32 +00:00
Dmitri Hrybenko
e81132d73e Update comment xml schema according to an upstream Clang change
Swift SVN r16652
2014-04-22 12:44:36 +00:00
Dmitri Hrybenko
68e8fee5fc Comment parsing: put more information into the generated XML documents
This commit adds infrastructure for conversion and testing it.

The conversion is still incomplete, pending discussion about which tags should
we use in the XML documents.  I copied the RelaxNG schema from Clang, and will
edit it accordingly.


Swift SVN r16451
2014-04-17 15:42:51 +00:00