Fortran-FOSS-Programmers / ford

Automatically generates FORtran Documentation from comments within the code.
https://forddocs.readthedocs.io
GNU General Public License v3.0
402 stars 131 forks source link

Parser failure in associate block with []-arrays #622

Closed mscfd closed 5 months ago

mscfd commented 5 months ago

For the following kind of associate block, the parser fails with "ValueError: not enough values to unpack (expected 2, got 1)". The bracketed array [..] is not parsed correctly and the split to new/old fails in "class Associations" in "def add_batch".

Here is a small example module, which triggers the error:

module mod

implicit none
private

contains

subroutine test()
   associate(phi => [1,2])
   end associate
end subroutine test

end module mod