fdoc

subroutineprune

subroutine prune(p, s)

Hide what should not be displayed.

Arguments

NameTypeIntentAttributesDescription
ptype(project_t)inout

the project

stype(settings_t)in

the settings

Calls

Source

Show the code
subroutine prune(p, s)
    type(project_t), intent(inout) :: p     !! the project
    type(settings_t), intent(in) :: s       !! the settings
    integer :: k

    do k = 1, p%list%n
        associate (e => p%list%box(k)%e)
            if (e%kind == E_NONE .or. e%parent == 0) cycle
            if (.not. allocated(e%permission)) cycle
            associate (parent => p%list%box(e%parent)%e)
                if (e%kind == E_VARIABLE .and. e%var_role /= VAR_PLAIN) cycle
                if (allocated(parent%display) .and. .not. is_program_unit(e%kind)) then
                    if (.not. contains_string(parent%display, e%permission)) e%visible = .false.
                end if
                if (s%hide_undoc .and. size(e%doc) == 0) e%visible = .false.
                if (is_procedure(parent%kind) .and. .not. parent%internals) then
                    e%visible = .false.
                end if
            end associate
        end associate
    end do
end subroutine prune

Graphs

Calls

Called by