File tree 3 files changed +32
-0
lines changed
3 files changed +32
-0
lines changed Original file line number Diff line number Diff line change @@ -248,6 +248,10 @@ enum DocDirectiveType {
248
248
],
249
249
),
250
250
251
+ /// A [DocDirective] indicating that constants should not have their own
252
+ /// pages or implementations displayed.
253
+ hideConstantImplementations ('hideConstantImplementations' ),
254
+
251
255
/// A [DocDirective] declaring a block of HTML content which is to be inserted
252
256
/// after all other processing, including Markdown parsing.
253
257
///
Original file line number Diff line number Diff line change @@ -403,6 +403,10 @@ final class DocCommentBuilder {
403
403
case 'example' :
404
404
_pushDocDirective (parser.simpleDirective (DocDirectiveType .example));
405
405
return true ;
406
+ case 'hideConstantImplementations' :
407
+ _pushDocDirective (parser
408
+ .simpleDirective (DocDirectiveType .hideConstantImplementations));
409
+ return true ;
406
410
case 'inject-html' :
407
411
_parseBlockDocDirectiveTag (parser, DocDirectiveType .injectHtml);
408
412
return true ;
Original file line number Diff line number Diff line change @@ -1109,6 +1109,30 @@ Comment
1109
1109
''' );
1110
1110
}
1111
1111
1112
+ test_hideConstantImplementations () {
1113
+ final parseResult = parseStringWithErrors (r'''
1114
+ int x = 0;
1115
+
1116
+ /// Text.
1117
+ /// {@hideConstantImplementations}
1118
+ class A {}
1119
+ ''' );
1120
+ parseResult.assertNoErrors ();
1121
+
1122
+ final node = parseResult.findNode.comment ('hideConstantImplementations' );
1123
+ assertParsedNodeText (node, r'''
1124
+ Comment
1125
+ tokens
1126
+ /// Text.
1127
+ /// {@hideConstantImplementations}
1128
+ docDirectives
1129
+ SimpleDocDirective
1130
+ tag
1131
+ offset: [26, 57]
1132
+ type: [DocDirectiveType.hideConstantImplementations]
1133
+ ''' );
1134
+ }
1135
+
1112
1136
test_indentedCodeBlock_afterBlankLine () {
1113
1137
final parseResult = parseStringWithErrors (r'''
1114
1138
/// Text.
You can’t perform that action at this time.
0 commit comments