Open implicitall opened 4 years ago
Also, not to mention submodule, which is similar to a module but with a parent parameter. submodule(parent) child
Could you give an example?
https://github.com/modern-fortran/generic-procedures/blob/master/src/mod_average.f90
In this example you don’t have to have the “::” for the generic if you don’t want. That could be a trick for parsing though if it was mandatory.
I found that "module procedure" handling is a bit tricky. In a submodule, "module procedure" acts as a subroutine with no parameters. In an interface, it just is a generic. My hack to handle this was to add new regular expressions for module procedures. Unfortunately, for module procedures in the interface declaration, the outside scope had to be checked so that it did not cause a scope increase. That doesn't seem like an elegant solution but I don't know of another way. In any case, the point is that "module procedure" has an issue.