You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The main parse_and_format has special handling for top-level comments and items, but this means those items don't benefit from/share code with the main formatting logic in to_doc. For example, when we process this code:
It gets parsed as a top-level type_alias item followed by a comment that gets treated as a top-level suffix comment in parse_and_format, which means we don't notice that it's been flagged as an inline comment. We could replicate that logic in parse_and_format, but I suspect we should instead try to simplify parse_and_format and rely more consistently on to_doc.
The text was updated successfully, but these errors were encountered:
The main
parse_and_format
has special handling for top-level comments and items, but this means those items don't benefit from/share code with the main formatting logic into_doc
. For example, when we process this code:It gets parsed as a top-level type_alias item followed by a comment that gets treated as a top-level suffix comment in
parse_and_format
, which means we don't notice that it's been flagged as an inline comment. We could replicate that logic inparse_and_format
, but I suspect we should instead try to simplifyparse_and_format
and rely more consistently onto_doc
.The text was updated successfully, but these errors were encountered: