Remove private tags from Ast

This commit is contained in:
Ayaz Hafiz 2022-04-25 11:20:37 -04:00
parent 67eb4b9faa
commit 1ed9cf551a
No known key found for this signature in database
GPG key ID: 0E2A37416A25EF58
16 changed files with 12 additions and 196 deletions

View file

@ -404,8 +404,7 @@ fn record_field_to_doc(
}
}
// The Option here represents if it is private. Private tags
// evaluate to `None`.
// The Option here represents if it is malformed.
fn tag_to_doc(in_func_ann: bool, tag: ast::Tag) -> Option<Tag> {
match tag {
ast::Tag::Global { name, args } => Some(Tag {
@ -420,7 +419,6 @@ fn tag_to_doc(in_func_ann: bool, tag: ast::Tag) -> Option<Tag> {
type_vars
},
}),
ast::Tag::Private { .. } => None,
ast::Tag::SpaceBefore(&sub_tag, _) => tag_to_doc(in_func_ann, sub_tag),
ast::Tag::SpaceAfter(&sub_tag, _) => tag_to_doc(in_func_ann, sub_tag),
ast::Tag::Malformed(_) => None,