mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
[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:
@@ -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";
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user