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
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:
subroutinesub_beforeinteger:: i
!> Trying to add a docstring to an expression
i =1endsubroutinesubroutinesub_no_docendsubroutine
The comment !> Trying to add a docstring to an expression is added as a docstring to sub_no_doc.
Expected behavior
When building the AST, pendic_doc should probably be cleared when something other than subroutine / function / type / module appears.
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.
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 #212 (comment)
The text was updated successfully, but these errors were encountered: