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
This commit is contained in:
David Farler
2015-07-01 02:03:25 +00:00
parent 7b98fbf4e9
commit dd44dad017
9 changed files with 102 additions and 5 deletions

View File

@@ -261,6 +261,8 @@ bool extractSimpleField(llvm::markup::MarkupContext &MC,
if (auto RF = dyn_cast<llvm::markup::ReturnsField>(Field))
Parts.ReturnsField = RF;
else if (auto TF = dyn_cast<llvm::markup::ThrowsField>(Field))
Parts.ThrowsField = TF;
else
Parts.BodyNodes.push_back(Field);
}