True if a preprocessor line starts at i (the first non-blank of the line): cpp #...,
fypp #:, #!, $: and @:. Inline fypp #{ is not a directive line.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| character(len=*), | intent(in) | :: | src |
source text |
||
| integer, | intent(in) | :: | i |
first non-blank byte of the line |
logical function is_preproc_start(src, i) !! True if a preprocessor line starts at `i` (the first non-blank of the line): cpp `#...`, !! fypp `#:`, `#!`, `$:` and `@:`. Inline fypp `#{` is not a directive line. character(len=*), intent(in) :: src !! source text integer, intent(in) :: i !! first non-blank byte of the line character :: c c = peek(src, i + 1) select case (src(i:i)) case ('#') is_preproc_start = c /= '{' .and. c /= '}' case ('$', '@') is_preproc_start = c == ':' case default is_preproc_start = .false. end select end function is_preproc_start