fdoc

subroutinemove_exprpureprivate

pure subroutine move_expr(from, to)

Move an expression, without copying what it holds.

Arguments

NameTypeIntentAttributesDescription
fromtype(expr_t)inout

the expression

totype(expr_t)inout

where it goes

Source

Show the code
pure subroutine move_expr(from, to)
    type(expr_t), intent(inout) :: from     !! the expression
    type(expr_t), intent(inout) :: to       !! where it goes

    to%kind = from%kind
    to%a = from%a
    to%b = from%b
    to%c = from%c
    to%name = from%name
    if (allocated(from%args)) call move_alloc(from%args, to%args)
    if (allocated(from%names)) call move_alloc(from%names, to%names)
    if (allocated(from%ops)) call move_alloc(from%ops, to%ops)
    if (allocated(from%text)) call move_alloc(from%text, to%text)
    to%value%kind = from%value%kind
    to%value%number = from%value%number
    if (allocated(from%value%text)) call move_alloc(from%value%text, to%value%text)
    if (allocated(from%value%items)) call move_alloc(from%value%items, to%value%items)
end subroutine move_expr

Graphs

Called by