Skip to content
  • Brad King's avatar
    Fortran: Add support for submodule syntax in dependency scanning · b5ac8b8a
    Brad King authored
    Fortran 2008 [1] adds support for a new syntax related to modules:
    
        submodule ( ParentModule ) SubModule
        submodule ( ParentModule : SubModule ) NestedSubModule
    
    Both of these mean that the current source file requires the module
    `ParentModule` to be available if it is not provided in the current
    file.  Teach our Fortran dependency scanner to parse this syntax to
    extract this relationship.  For now simply tolerate the nested submodule
    case and extract only the dependency it expresses on the main module.
    Further work will be needed to extract dependencies among nested
    submodules.
    
    [1] http://fortranwiki.org/fortran/show/Fortran+2008
    
    Closes: #16234
    b5ac8b8a