structure_t Derived Type

type, public :: structure_t

The block structure of a source: for each item (see ffmt_statements) what it is and how deeply it is nested.


Inherits

type~~structure_t~~InheritsGraph type~structure_t structure_t type~stmt_info_t stmt_info_t type~structure_t->type~stmt_info_t info

Components

Type Visibility Attributes Name Initial
integer, public, allocatable :: depth(:)

nesting depth of each item: the constructs around it

integer, public, allocatable :: fypp(:)

fypp blocks (#:if, #:for, #:def, ...) around each item; a directive line is outside its own block

type(stmt_info_t), public, allocatable :: info(:)

classification of each item (ROLE_NONE for non-code)

integer, public, allocatable :: procedures(:)

how many are procedure definitions (subroutine, function or separate module procedure, but not interface bodies)

integer, public, allocatable :: units(:)

how many of those are program units (module, submodule or main program)


Source Code

type, public :: structure_t
    !! The block structure of a source: for each item (see [[ffmt_statements]]) what it is and how
    !! deeply it is nested.
    type(stmt_info_t), allocatable :: info(:)   !! classification of each item (`ROLE_NONE` for non-code)
    integer, allocatable :: depth(:)            !! nesting depth of each item: the constructs around it
    integer, allocatable :: units(:)            !! how many of those are program units (module, submodule
                                                !! or main program)
    integer, allocatable :: procedures(:)       !! how many are procedure definitions (subroutine,
                                                !! function or separate module procedure, but not
                                                !! interface bodies)
    integer, allocatable :: fypp(:)             !! fypp blocks (`#:if`, `#:for`, `#:def`, ...) around each
                                                !! item; a directive line is outside its own block
end type structure_t