Index of the line break that ends the line containing token i, or the last token.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(token_list_t), | intent(in) | :: | tokens |
the token list |
||
| integer, | intent(in) | :: | i |
a token at or after the start of the line |
pure integer function line_end_token(tokens, i) result(j) !! Index of the line break that ends the line containing token `i`, or the last token. type(token_list_t), intent(in) :: tokens !! the token list integer, intent(in) :: i !! a token at or after the start of the line do j = i, tokens%n if (tokens%tok(j)%kind == TK_NEWLINE) return end do j = tokens%n end function line_end_token