Skip to content

Commit 67e2673

Browse files
committed
fix: reorder dependency extraction mode as more specific
1 parent 4cd79a3 commit 67e2673

File tree

1 file changed

+23
-11
lines changed

1 file changed

+23
-11
lines changed

include/mrdocs/Metadata/ExtractionMode.hpp

Lines changed: 23 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -25,26 +25,33 @@ namespace clang::mrdocs {
2525
*/
2626
enum class ExtractionMode
2727
{
28-
/// We're extracting the current symbol even though it
29-
/// doesn't pass all filters because it's a direct dependency
30-
/// of a symbol that does pass all filters and needs
31-
/// information about it (e.g.: base classes outside the filters)
32-
Dependency,
33-
3428
/// We're extracting the current symbol because it passes
35-
/// all filters
29+
/// all filters.
3630
Regular,
3731

3832
/// We're extracting the current symbol because it passes
3933
/// all filters, but we should also tag it as see-below
40-
/// because it passes one of the see-below filters
34+
/// because it passes one of the see-below filters.
35+
/// This symbol has its own page but it has no details
36+
/// and no child members.
4137
SeeBelow,
4238

4339
/// We're extracting the current symbol because it passes
4440
/// all filters, but we should also tag it as
4541
/// implementation-defined because one of its parents
46-
/// matches the implementation-defined filter
42+
/// matches the implementation-defined filter.
43+
/// This symbol has no page and other symbols that
44+
/// depend on it will just render /*implementation-defined*/.
4745
ImplementationDefined,
46+
47+
/// We're extracting the current symbol even though it
48+
/// doesn't pass all filters because it's a direct dependency
49+
/// of a symbol that does pass all filters and needs
50+
/// information about it (e.g.: base classes outside the filters).
51+
/// This symbol has no page and it might even deleted from
52+
/// the corpus if no other symbol depends on it after we extracted
53+
/// the information we wanted from it in post-processing steps.
54+
Dependency,
4855
};
4956

5057
/** Return the name of the InfoKind as a string.
@@ -55,14 +62,14 @@ toString(ExtractionMode kind) noexcept
5562
{
5663
switch(kind)
5764
{
58-
case ExtractionMode::Dependency:
59-
return "dependency";
6065
case ExtractionMode::Regular:
6166
return "regular";
6267
case ExtractionMode::SeeBelow:
6368
return "see-below";
6469
case ExtractionMode::ImplementationDefined:
6570
return "implementation-defined";
71+
case ExtractionMode::Dependency:
72+
return "dependency";
6673
}
6774
MRDOCS_UNREACHABLE();
6875
}
@@ -83,6 +90,11 @@ tag_invoke(
8390
8491
This function returns the least specific of the two
8592
ExtractionModes in terms of number of filters passed.
93+
94+
If the symbol passes the filter that categorizes it
95+
as `a` then it also passes the filter that categorizes
96+
it as `b` (or vice-versa), then this function will return the
97+
final category for the symbol.
8698
*/
8799
constexpr
88100
ExtractionMode

0 commit comments

Comments
 (0)