subroutineexpectprivate
subroutine expect(c, s, word)
Go past token word, which must come next.
Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
| c | type(fypp_t) | inout | the state | |
| s | type(scan_t) | inout | the expression | |
| word | character(len=*) | in | the token |
Calls
Source
Show the code
subroutine expect(c, s, word)
type(fypp_t), intent(inout) :: c !! the state
type(scan_t), intent(inout) :: s !! the expression
character(len=*), intent(in) :: word !! the token
if (at_word(s, word)) then
call next_token(c, s)
else
call fail(c, "expected '"//word//"' in: "//s%text)
end if
end subroutine expect