[IDE] Add an option to skip printing declarations that start with '_', for the module interface.

rdar://16559411

Swift SVN r16272
This commit is contained in:
Argyrios Kyrtzidis
2014-04-13 04:35:30 +00:00
parent ba30e56b58
commit 293d771905
5 changed files with 44 additions and 27 deletions

View File

@@ -302,14 +302,15 @@ void swift::ide::printSubmoduleInterface(
}
ASTPrinter &Printer = *PrinterToUse;
D->print(Printer, AdjustedOptions);
Printer << "\n";
if (auto NTD = dyn_cast<NominalTypeDecl>(D)) {
for (auto Ext : NTD->getExtensions()) {
if (Options.PrintRegularClangComments && Ext->hasClangNode())
continue; // will be printed in its source location, see above.
Ext->print(Printer, AdjustedOptions);
Printer << "\n";
if (D->print(Printer, AdjustedOptions)) {
Printer << "\n";
if (auto NTD = dyn_cast<NominalTypeDecl>(D)) {
for (auto Ext : NTD->getExtensions()) {
if (Options.PrintRegularClangComments && Ext->hasClangNode())
continue; // will be printed in its source location, see above.
Ext->print(Printer, AdjustedOptions);
Printer << "\n";
}
}
}
};