Open plevold opened 2 years ago
Cheers @plevold, so this should be attached to the integer :: i
AST node. If placed in the same line as integer :: i
then it attaches correctly. I suspect what I need to do is ignore new lines and attached to the previous AST node. Not sure if that will break the existing parser.
I think that it's not bug. If I change the !>
to !<
it would work properly.
Describe the bug Due to the way fortls parses Doxygen style comments they could appear in unexpected places if a developer is not careful about using
!>
comments.To Reproduce In the following example:
The comment
!> Trying to add a docstring to an expression
is added as a docstring tosub_no_doc
.Expected behavior When building the AST,
pendic_doc
should probably be cleared when something other thansubroutine
/function
/type
/module
appears.See also https://github.com/fortran-lang/fortls/issues/212#issuecomment-1299691619