Column of token t in the input (characters before it on its line).
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| character(len=*), | intent(in) | :: | src |
the source text |
||
| type(token_t), | intent(in) | :: | t |
a token of |
pure integer function input_column(src, t) result(col) !! Column of token `t` in the input (characters before it on its line). character(len=*), intent(in) :: src !! the source text type(token_t), intent(in) :: t !! a token of `src` integer :: j j = scan(src(1:t%first - 1), achar(10)//achar(13), back=.true.) col = utf8_width(src(j + 1:t%first - 1)) end function input_column