subroutineparse_itemsrecursiveprivate
recursive subroutine parse_items(c, s, id, first, closing)
The items of a list or tuple, after the first, which is first.
Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
| c | type(fypp_t) | inout | the state | |
| s | type(scan_t) | inout | the expression | |
| id | integer | in | the list | |
| first | integer | in | its first item | |
| closing | character(len=*) | in | the token after the last item |
Calls
Source
Show the code
recursive subroutine parse_items(c, s, id, first, closing)
type(fypp_t), intent(inout) :: c !! the state
type(scan_t), intent(inout) :: s !! the expression
integer, intent(in) :: id !! the list
integer, intent(in) :: first !! its first item
character(len=*), intent(in) :: closing !! the token after the last item
integer :: item
call push_id(c%exprs(id)%args, first)
do while (at_word(s, ','))
call next_token(c, s)
if (at_word(s, closing)) exit
call parse_test(c, s, item)
call push_id(c%exprs(id)%args, item)
end do
end subroutine parse_items