functionchain_endprivate
integer function chain_end(v, j) result(last)
The last name of the component chain starting at token j, or 0.
Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
| v | type(statement_view_t) | in | the statement | |
| j | integer | in | the first name |
Result
| Name | Type | Attributes | Description |
|---|---|---|---|
| last | integer | private |
Source
Show the code
function chain_end(v, j) result(last)
type(statement_view_t), intent(in) :: v !! the statement
integer, intent(in) :: j !! the first name
integer :: last, k
last = 0
k = j
do
if (v%kind_of(k) /= TK_NAME) return
last = k
k = k + 1
if (v%is(k, '(')) then
if (v%closing(k) == 0) return
k = v%closing(k) + 1
end if
if (.not. v%is(k, '%')) return
k = k + 1
end do
end function chain_end