functionat_wordpureprivate
pure logical function at_word(s, word)
True if the current token is word, as an operator or keyword.
Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
| s | type(scan_t) | in | the expression | |
| word | character(len=*) | in | the word |
Result
| Name | Type | Attributes | Description |
|---|---|---|---|
| at_word | logical |
Called by
- def_directive
- expect
- parse_and
- parse_arguments
- parse_compare
- parse_comprehension
- parse_items
- parse_list
- parse_not
- parse_or
- parse_postfix
- parse_primary
- parse_product
- parse_subscript
- parse_sum
- parse_test
- parse_unary
Source
Show the code
pure logical function at_word(s, word)
type(scan_t), intent(in) :: s !! the expression
character(len=*), intent(in) :: word !! the word
at_word = .false.
if (s%kind /= T_OP .and. s%kind /= T_NAME) return
if (len(s%word) /= len(word)) return
at_word = s%word == word
end function at_word