Comment parsing: for now, treat classes, protocols and structs as "class-like"

things


Swift SVN r16453
This commit is contained in:
Dmitri Hrybenko
2014-04-17 16:13:47 +00:00
parent 68e8fee5fc
commit 6680ed3956
2 changed files with 8 additions and 0 deletions

View File

@@ -198,6 +198,9 @@ void CommentToXMLConverter::visitFullComment(const FullComment *FC) {
if (isa<AbstractFunctionDecl>(D)) { if (isa<AbstractFunctionDecl>(D)) {
OS << "<Function"; OS << "<Function";
RootEndTag = "</Function>"; RootEndTag = "</Function>";
} else if (isa<StructDecl>(D) || isa<ClassDecl>(D) || isa<ProtocolDecl>(D)) {
OS << "<Class";
RootEndTag = "</Class>";
} else { } else {
OS << "<Other"; OS << "<Other";
RootEndTag = "</Other>"; RootEndTag = "</Other>";

View File

@@ -19,6 +19,11 @@ SWIFT_CLASS("_TtC8comments21A010_AttachToEntities")
@end @end
SWIFT_PROTOCOL("_TtP8comments21A013_AttachToEntities_")
@protocol A013_AttachToEntities
@end
SWIFT_CLASS("_TtC8comments18A100_EmptyComments") SWIFT_CLASS("_TtC8comments18A100_EmptyComments")
@interface A100_EmptyComments @interface A100_EmptyComments