subroutinemove_nodepureprivate
pure subroutine move_node(from, to)
Move a node, without copying what it holds.
Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
| from | type(node_t) | inout | the node | |
| to | type(node_t) | inout | where it goes |
Source
Show the code
pure subroutine move_node(from, to)
type(node_t), intent(inout) :: from !! the node
type(node_t), intent(inout) :: to !! where it goes
to%kind = from%kind
to%on_lines = from%on_lines
to%expr = from%expr
to%name = from%name
if (allocated(from%text)) call move_alloc(from%text, to%text)
if (allocated(from%source)) call move_alloc(from%source, to%source)
if (allocated(from%block)) call move_alloc(from%block, to%block)
end subroutine move_node