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 |
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