First token in first:last that is not a blank, or last + 1.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(token_list_t), | intent(in) | :: | tokens |
the token list |
||
| integer, | intent(in) | :: | first |
the token range to search |
||
| integer, | intent(in) | :: | last |
the token range to search |
pure integer function first_non_blank(tokens, first, last) result(f) !! First token in `first:last` that is not a blank, or `last + 1`. type(token_list_t), intent(in) :: tokens !! the token list integer, intent(in) :: first, last !! the token range to search do f = first, last if (tokens%tok(f)%kind /= TK_SPACE) return end do f = last + 1 end function first_non_blank