subroutineread_submoduleprivate
subroutine read_submodule(e, line)
Read a submodule statement.
Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
| e | type(entity_t) | inout | the submodule | |
| line | character(len=*) | in | the statement |
Calls
Source
Show the code
subroutine read_submodule(e, line)
type(entity_t), intent(inout) :: e !! the submodule
character(len=*), intent(in) :: line !! the statement
character(len=:), allocatable :: inside
integer :: open, close, colon
open = index(line, '(')
close = index(line, ')')
e%name = strip(line(close + 1:))
inside = lowercase(remove_blanks(line(open + 1:close - 1)))
colon = index(inside, ':')
if (colon > 0) then
e%more%ancestor = inside(:colon - 1)
e%more%parent_submodule = inside(colon + 1:)
else
e%more%ancestor = inside
end if
end subroutine read_submodule