fdoc

subroutineparse_listrecursiveprivate

recursive subroutine parse_list(c, s, id)

An expression, or several separated by commas, which make a tuple.

Arguments

NameTypeIntentAttributesDescription
ctype(fypp_t)inout

the state

stype(scan_t)inout

the expression

idintegerout

the result

Calls

Source

Show the code
recursive subroutine parse_list(c, s, id)
    type(fypp_t), intent(inout) :: c    !! the state
    type(scan_t), intent(inout) :: s    !! the expression
    integer, intent(out) :: id          !! the result
    integer :: item

    call parse_test(c, s, id)
    if (.not. at_word(s, ',')) return
    item = id
    id = new_expr(c, E_TUPLE)
    call push_id(c%exprs(id)%args, item)
    do while (at_word(s, ','))
        call next_token(c, s)
        if (s%kind == T_END) exit
        call parse_test(c, s, item)
        call push_id(c%exprs(id)%args, item)
    end do
end subroutine parse_list

Graphs

Calls

Called by