subroutinecorrelate
subroutine correlate(p, s)
Connect entities across files: the public names of each module, and what types inherit.
Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
| p | type(project_t) | inout | the project | |
| s | type(settings_t) | in | the settings |
Calls
Source
Show the code
subroutine correlate(p, s)
type(project_t), intent(inout) :: p !! the project
type(settings_t), intent(in) :: s !! the settings
integer :: k, n
if (.not. allocated(p%modules)) allocate (p%modules(0))
if (.not. allocated(p%submodules)) allocate (p%submodules(0))
call add_external_modules(p, s)
allocate (p%pub(size(p%modules)))
call link_uses(p)
do k = 1, size(p%modules)
call public_names(p, k)
end do
n = p%list%n
do k = 1, n
if (p%list%box(k)%e%kind /= E_TYPE) cycle
if (p%list%box(k)%e%parent == 0) cycle
call set_constructor(p, k)
call inherit(p, k)
end do
end subroutine correlate