view_word Function

private pure function view_word(v, j) result(w)

Lowercase text of code token j, or '' outside the statement.

Type Bound

statement_view_t

Arguments

Type IntentOptional Attributes Name
class(statement_view_t), intent(in) :: v

the statement

integer, intent(in) :: j

index into v%code(:)

Return Value character(len=:), allocatable


Called by

proc~~view_word~~CalledByGraph proc~view_word statement_view_t%view_word proc~module_key module_key proc~module_key->proc~view_word proc~names_case names_case proc~names_case->proc~view_word proc~sort_only_list sort_only_list proc~sort_only_list->proc~view_word proc~statement_case statement_case proc~statement_case->proc~view_word proc~statement_gaps statement_gaps proc~statement_gaps->proc~view_word proc~compute_case compute_case proc~compute_case->proc~names_case proc~compute_case->proc~statement_case proc~compute_gaps compute_gaps proc~compute_gaps->proc~statement_gaps proc~sort_use sort_use proc~sort_use->proc~module_key proc~sort_use->proc~sort_only_list proc~format_pass format_pass proc~format_pass->proc~compute_case proc~format_pass->proc~compute_gaps proc~format_text format_text proc~format_text->proc~sort_use proc~format_text->proc~format_pass proc~relayout relayout proc~format_text->proc~relayout proc~process_text process_text proc~process_text->proc~format_text proc~relayout->proc~format_pass proc~process_file process_file proc~process_file->proc~process_text proc~process_stdin process_stdin proc~process_stdin->proc~process_text proc~run run proc~run->proc~process_file proc~run->proc~process_stdin

Source Code

pure function view_word(v, j) result(w)
    !! Lowercase text of code token `j`, or `''` outside the statement.
    class(statement_view_t), intent(in) :: v   !! the statement
    integer, intent(in) :: j                   !! index into `v%code(:)`
    character(len=:), allocatable :: w
    if (j < 1 .or. j > v%n) then
        w = ''
    else
        w = v%low(v%lo(j):v%hi(j))
    end if
end function view_word