File tree Expand file tree Collapse file tree 1 file changed +68
-3
lines changed Expand file tree Collapse file tree 1 file changed +68
-3
lines changed Original file line number Diff line number Diff line change @@ -632,13 +632,78 @@ break;
632
632
llvm_unreachable (" Can't directly print Doxygen for a Swift Markup PrivateExtension" );
633
633
}
634
634
635
+ void printNestedParamField (const ParamField *PF) {
636
+ auto Parts = PF->getParts ().getValue ();
637
+ if (Parts.Brief .hasValue ()) {
638
+ printASTNode (Parts.Brief .getValue ());
639
+ printNewline ();
640
+ }
641
+
642
+ if (!Parts.ParamFields .empty ()) {
643
+ printNewline ();
644
+ print (" \\ a " );
645
+ print (PF->getName ());
646
+ print (" parameters:" );
647
+ printNewline ();
648
+
649
+ print (" <ul>" );
650
+ printNewline ();
651
+ for (auto Param : Parts.ParamFields ) {
652
+ print (" <li>" );
653
+ printNewline ();
654
+ print (Param->getName ());
655
+ print (" : " );
656
+ printNestedParamField (Param);
657
+ print (" </li>" );
658
+ printNewline ();
659
+ }
660
+ print (" </ul>" );
661
+ printNewline ();
662
+ printNewline ();
663
+ }
664
+
665
+ if (Parts.ReturnsField .hasValue ()) {
666
+ printNewline ();
667
+ print (" \\ a " );
668
+ print (PF->getName ());
669
+ print (" returns: " );
670
+
671
+ for (auto Child : Parts.ReturnsField .getValue ()->getChildren ()) {
672
+ printASTNode (Child);
673
+ printNewline ();
674
+ }
675
+ }
676
+
677
+ if (Parts.ThrowsField .hasValue ()) {
678
+ printNewline ();
679
+ print (" \\ a " );
680
+ print (PF->getName ());
681
+ print (" error: " );
682
+
683
+ for (auto Child : Parts.ThrowsField .getValue ()->getChildren ()) {
684
+ printASTNode (Child);
685
+ printNewline ();
686
+ }
687
+ }
688
+
689
+ for (auto BodyNode : Parts.BodyNodes ) {
690
+ printASTNode (BodyNode);
691
+ printNewline ();
692
+ }
693
+ printNewline ();
694
+ }
695
+
635
696
void printParamField (const ParamField *PF) {
636
697
print (" \\ param " );
637
698
print (PF->getName ());
638
699
print (" " );
639
- for (auto Child : PF->getChildren ())
640
- printASTNode (Child);
641
-
700
+ if (PF->isClosureParameter ()) {
701
+ printNestedParamField (PF);
702
+ } else {
703
+ for (auto Child : PF->getChildren ()) {
704
+ printASTNode (Child);
705
+ }
706
+ }
642
707
printNewline ();
643
708
}
644
709
You can’t perform that action at this time.
0 commit comments