True if the last token of the line before any comment is a continuation &.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(token_list_t), | intent(in) | :: | tokens |
the token list |
||
| integer, | intent(in) | :: | i |
tokens to search, up to the end of the line |
||
| integer, | intent(in) | :: | lend |
tokens to search, up to the end of the line |
pure logical function ends_with_continuation(tokens, i, lend) !! True if the last token of the line before any comment is a continuation `&`. type(token_list_t), intent(in) :: tokens !! the token list integer, intent(in) :: i, lend !! tokens to search, up to the end of the line integer :: k ends_with_continuation = .false. do k = lend, i, -1 select case (tokens%tok(k)%kind) case (TK_SPACE, TK_NEWLINE, TK_COMMENT) cycle case (TK_CONT) ends_with_continuation = tokens%tok(k)%sub == CT_TRAILING return case default return end select end do end function ends_with_continuation