fdoc

subroutineparse_testrecursiveprivate

recursive subroutine parse_test(c, s, id)

An expression, which may be conditional.

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_test(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 :: condition, other, value

    call parse_or(c, s, id)
    if (.not. at_word(s, 'if')) return
    value = id
    call next_token(c, s)
    call parse_or(c, s, condition)
    call expect(c, s, 'else')
    call parse_test(c, s, other)
    id = new_expr(c, E_IF, condition, value, other)
end subroutine parse_test

Graphs

Calls

Called by